home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / rtnews.zip / RTNV3N2 < prev    next >
Text File  |  1992-09-13  |  102KB  |  2,823 lines

  1.  _ __                 ______                         _ __
  2. ' )  )                  /                           ' )  )
  3.  /--' __.  __  ,     --/ __  __.  _. o ____  _,      /  / _  , , , _
  4. /  \_(_/|_/ (_/_    (_/ / (_(_/|_(__<_/ / <_(_)_    /  (_</_(_(_/_/_)_
  5.              /                               /|
  6.             '                               |/
  7.  
  8.             "Light Makes Right"
  9.  
  10.             March 20, 1990
  11.                 Volume 3, Number 2
  12.  
  13. Compiled by Eric Haines, 3D/Eye Inc, 2359 Triphammer Rd, Ithaca, NY 14850
  14.     wrath.cs.cornell.edu!eye!erich
  15.     [distributed by Michael Cohen, but send contributions and subscription
  16.     requests to Eric Haines]
  17. All contents are US copyright (c) 1990 by the individual authors
  18. Archive locations: anonymous FTP at cs.uoregon.edu (128.223.4.13), /pub and at
  19.            freedom.graphics.cornell.edu (128.84.247.85), /pub/RTNews
  20. Unofficial site: uunet.uu.net [192.48.96.2], /graphics
  21. UUCP access: check Vol 3, No 1 or Kory Hamzeh (quad.com!avatar!kory) for info.
  22.  
  23. Contents:
  24.     Introduction
  25.     New People, Address Changes, etc
  26.     FTP Site List, by Eric Haines
  27.     RayShade Posting and Patches and Whatnot, by Craig Kolb
  28.     Common Rendering Language, by Eric Haines
  29.     Avoiding Re-Intersection Testing, by Eric Haines
  30.     Torus Equation Correction, by Pat Hanrahan
  31.     "Introduction to Ray Tracing" Shading Model Errata, by Kathy Kershaw
  32.     Comments on Last Issue, by Mark VandeWettering
  33.     An Improvement to Goldsmith/Salmon, by Jeff Goldsmith
  34.     Fiddling with the Normal Vector, by H. 'ZAP' Anderson
  35.     A Note on Texture Sampling, by Eric Haines
  36.     Unofficial MTV Patches, by Eric Haines
  37.     ======== USENET cullings follow ========
  38.     OFF Databases, by Randi Rost
  39.     VM_pRAY is now available, by Didier Badouel
  40.     Superquadrics, by Prem Subrahmanyam, Patrick Flynn, Ron Daniel, and
  41.     Mark VandeWettering
  42.     Graphics Textbook Recommendations, by Paul Heckbert, Mark VandeWettering,
  43.     and Kent Paul Dolan
  44.     Where To Find U.S. Map Data, by Dru Nelson
  45.     References for Rendering Height Fields, Mark VandeWettering
  46.     RayShade 3.0 Released on comp.sources.unix, by Craig Kolb
  47.     Bibliography of Texture Mapping & Image Warping, by Paul Heckbert
  48.     More Texturing Functions, by Jon Buller
  49.     Ray/Cylinder Intersection, by Mark VandeWettering
  50.     C Code for Intersecting Quadrics, by Prem Subrahmanyam
  51.     Parallel Ray Tracing on IRISs, collected by Doug Turner
  52.  
  53. -------------------------------------------------------------------------------
  54.  
  55. Introduction
  56.  
  57.     Well, it's been awhile.  I've been detoured by making demos for NCGA,
  58. but now that's over and I can catch up with editing the RT News.  Actually,
  59. doing demos was interesting this time around:  I wrote a personal visualizer
  60. ("personal" is definitely the right word; so far, only I can use it) for
  61. setting up the view, light sources, materials, and positions of objects (i.e.
  62. no modeling capability per se), along with some animation tools.  Beats the
  63. daylights out of my old visualizer (aka known as Unix's "vi" editor).  Anyway,
  64. interactive graphics is pretty enjoyable - I'd forgotten.  Nice to have an
  65. image come up in less than an hour, let alone less than a second.
  66.  
  67.     I've heard from a few people that Silicon Graphics' new machine is
  68. pretty hot:  surface and reflection (environmental) texturing in hardware, and
  69. it's pretty fast at it.  Intergraph evidentally has some kind of ability to
  70. change material attributes of objects in a ray traced image and have the
  71. changes to the image compute and display quite rapidly.  They claim to NOT be
  72. storing the intersection trees for all of the pixels, so I'm looking forward
  73. to seeing this myself and figure out how they do it (my current theories of
  74. "it's just a videotape shown on the screen" and "they've made a pact with the
  75. devil" not being the most scientific).
  76.  
  77.     By the way, the "Introduction to Ray Tracing" book is not out-of-print.
  78. Evidentally there was a temporary shortage, but they've reprinted it and it
  79. should be back in stock now.
  80.  
  81. -------------------------------------------------------------------------------
  82.  
  83. New People, Address Changes, etc
  84.  
  85.  
  86. # Eric Chet - acceleration
  87. # 4047 Forest Hill Drive
  88. # Lorain, Ohio, 44053
  89. alias   eric_chet   chet@cis.ohio-state.edu
  90.  
  91.      My main interest in ray tracing now is acceleration.  I'm developing a
  92. ray tracer in 680x0 assembler to make it as efficient as possible with the
  93. algorithms I'm implementing.  Spatial subdivision and ray coherence are the
  94. techniques I'm working with.
  95.  
  96. --------
  97.  
  98. John McMillan, Department of Physics
  99.            University of Leeds
  100.            Leeds LS2 9JT
  101.            West Yorks
  102.            Great Britain
  103. phy6jem@cms1.ucs.leeds.ac.uk
  104.  
  105. My interest is slightly different from your normal application of raytracing.
  106. I'm not interested in images at all.  I design scintillation detectors in
  107. which light is produced in a medium in response to a charged particle passing
  108. through.  Some of this light eventually makes its way to a photomultiplier
  109. (circular window) where it is converted into an electrical signal.  I'm
  110. interested in following rays through various geometries of materials with
  111. different refractive indices and reflection coefficients.  So I guess you can
  112. probably see why I'm interested in Ray Tracing News.
  113.  
  114. --------
  115.  
  116. Marinko Laban - shading, anti-aliasing, CSG & Modelling
  117. K.T.I. BV
  118. Bredewater 26
  119. 2700 AB Zoetermeer (The Netherlands)
  120. ???-079-531521 (Don't know the USA access code)
  121. e-mail address: hp4nl!hp4nl.nluug.nl!ktibv!ml
  122.  
  123. During my University study, I obtained various copies of your Ray Tracing
  124. Newsletter.  These copies were given to me by the supervisor of my Master
  125. project, M. Frits Post (Tech.University of Delft, Holland).
  126.  
  127. Under his supervision I've written my Master Thesis about distributed ray
  128. tracing and I also wrote an implementation of one.  I've got my Master degree
  129. for a few months now, and I'm currently working as a CAD software engineer at
  130. Kinetics Technology International.
  131.  
  132. My professional tasks are developing & evaluating CAD & Engineering software
  133. for Industrial Plant Design.  I also keep myself busy with our UNIX computers,
  134. and all sorts of small bits and pieces.  When I have the opportunity & time I
  135. have some SPARC's do some ray tracing from me ... I also keep my personal
  136. Amiga busy doing all kinds of graphics stuff.
  137.  
  138. --------
  139.  
  140. David Tonnesen
  141. Dept. of Computer Science
  142. University of Toronto
  143. Toronto, Ontario  M5S 1A4
  144. (416) 978-6986 and 978-6619
  145.  
  146. research: modeling and rendering
  147.  
  148. e-mail:  davet@dgp.toronto.edu   (UUCP/CSNET/ARPANET)
  149.          davet@dgp.utoronto      (BITNET)
  150.  
  151. I am a Ph.D. student at the University of Toronto and interested in a variety
  152. of graphic topics including ray tracing.  Other areas I am interested in
  153. include models of deformable models, global illumination models, models of
  154. natural phenomena, physically based modeling, etc...  Basically modeling and
  155. rendering.
  156.  
  157. --------
  158.  
  159. Jim Arvo, of Apollo, has the new email address:
  160.  
  161.         arvo@apollo.hp.com
  162.  
  163. --------
  164.  
  165. Carl Bass, of Ithaca Software, is moving to California.  He should have a
  166. new mailing address soon.  His latest address has been updated to:
  167.  
  168.     carl@mssun7.msi.cornell.edu
  169.  
  170. -------------------------------------------------------------------------------
  171.  
  172. FTP Site List, by Eric Haines
  173.  
  174. This is my own collection of sites which have ftp-able software or documents
  175. that have some relevance to ray tracer.  If you don't know how to use ftp, see
  176. Didier Badouel's article in this issue for an example.  Recall that it's
  177. considered polite to download large amounts of stuff only after business
  178. hours.  If a site has a software name with asterisks around it (e.g. *RT
  179. News*), this means that the site is the "home" of this stuff (or is updated
  180. often enough by the site that the site's offering is usually the most current
  181. version).  The archive manager (more or less) is listed at the end of each
  182. entry.  Please do send on any corrections or clarifications you have.  Sites
  183. are always changing, so please do keep me posted.  I'm not going to bother
  184. with "gif" image file sites (though they are useful for texturing), as the
  185. list would double in size.  The sites below are listed more or less in the
  186. order of most to least extensive ray-trace related material stored.
  187.  
  188. Mark VandeWettering's MTV ray tracer was posted to comp.sources.unix and is
  189. postings v18i070-072.  Sid Grange's ray tracer is v05i046.  Craig Kolb's
  190. RayShade has just been posted to comp.sources.unix, v21i008.  Note: patch4
  191. is now available for RayShade.
  192.  
  193. cs.uoregon.edu [128.223.4.13]:  /pub - *MTV ray tracer*, *RT News*, *RT
  194.     bibliography*, other raytracers (including RayShade, QRT, VM_pRAY),
  195.     SPD/NFF, OFF objects, musgrave papers, some Netlib polyhedra, Roy Hall
  196.     book source code, Hershey fonts, old FBM.  Mark VandeWettering
  197.     <markv@acm.princeton.edu>
  198.  
  199. hanauma.stanford.edu [36.51.0.16]: /pub/graphics/Comp.graphics - best of
  200.     comp.graphics (very extensive), ray-tracers - DBW, MTV, QRT, and more.
  201.  
  202. weedeater.math.yale.edu [130.132.23.17]:  *Rayshade 3.0 ray tracer*, *color
  203.     quantization code*, Utah raster toolkit, newer FBM.  Craig Kolb
  204.     <kolb@yale.edu>
  205.  
  206. freedom.graphics.cornell.edu [128.84.247.85]:  *RT News back issues, source
  207.     code from Roy Hall's book "Illumination and Color in Computer
  208.     Generated Imagery", SPD package, Heckbert/Haines ray tracing article
  209.     bibliography, Muuss timing papers.
  210.  
  211. uunet.uu.net [192.48.96.2]: /graphics - RT News back issues, other graphics
  212.     related material.
  213.  
  214. life.pawl.rpi.edu [128.113.10.2]: /pub/ray - *Kyriazis stochastic Ray Tracer*.
  215.     George Kyriazis <kyriazis@turing.cs.rpi.edu>
  216.  
  217. geomag.gly.fsu.edu [128.186.10.2]:  /pub/pics/DBW.src and DBW.microray.src -
  218.     *DBW Render source*, ray traced images.  Prem Subramanyan
  219.     <prem@geomag.fsu.edu>
  220.  
  221. xanth.cs.odu.edu [128.82.8.1]:  /amiga/dbw.zoo - DBW Render for the Amiga (zoo
  222.     format).  Tad Guy <tadguy@cs.odu.edu>
  223.  
  224. munnari.oz.au [128.250.1.21]:  */pub/graphics/vort.tar.Z - CSG and algebraic
  225.     surface ray tracer*, /pub - DBW, pbmplus.  David Hook
  226.     <dgh@munnari.oz.au>
  227.  
  228. cs.utah.edu [128.110.4.21]: /pub - *Utah raster toolkit*.  Spencer Thomas
  229.     <thomas@cs.utah.edu>
  230.  
  231. gatekeeper.dec.com [16.1.0.2]: /pub/DEC/off.tar.Z - *OFF objects*,
  232.     /pub/misc/graf-bib - *graphics bibliographies (incomplete)*.  Randi
  233.     Rost <rost@granite.dec.com>
  234.  
  235. expo.lcs.mit.edu [18.30.0.212]:  contrib - *pbm.tar.Z portable bitmap
  236.     package*, *poskbitmaptars bitmap collection*, *Raveling Img*,
  237.     xloadimage.  Jef Poskanzer <jef@well.sf.ca.us>
  238.  
  239. venera.isi.edu [128.9.0.32]:  */pub/Img.tar.z and img.tar.z - some image
  240.     manipulation*, /pub/images - RGB separation photos.  Paul Raveling
  241.     <raveling@venera.isi.edu>
  242.  
  243. ftp.ee.lbl.gov [128.3.254.68]: *pbmplus.tar.Z*.
  244.  
  245. ucsd.edu [128.54.16.1]: /graphics - utah rle toolkit, pbmplus, fbm, databases, 
  246.     MTV, DBW and other ray tracers, world map, other stuff.  Not updated
  247.     much recently.
  248.  
  249. okeeffe.berkeley.edu [128.32.130.3]:  /pub - TIFF software and pics.  Sam
  250.     Leffler <sam@okeeffe.berkeley.edu>
  251.  
  252. curie.cs.unc.edu [128.109.136.157]:  /pub - DBW, pbmplus, /pub/graphics - vort.
  253.     Jeff Butterworth <butterwo@cs.unc.edu>
  254.  
  255. irisa.fr [131.254.2.3]:  */iPSC2/VM_pRAY ray tracer*, /NFF - some non-SPD NFF
  256.     format scenes.  Didier Badouel <badouel@irisa.irisa.fr>
  257.  
  258. hc.dspo.gov [192.12.184.4]:  {have never connected} Images?
  259.  
  260. netlib automatic mail replier:  UUCP - research!netlib, Internet -
  261.     netlib@ornl.gov.  *SPD package*, *polyhedra databases*.  Send one
  262.     line message "send index" for more info.
  263.  
  264. UUCP archive: avatar - RT News back issues.  For details, write Kory Hamzeh
  265.     <kory@avatar.avatar.com>
  266.  
  267.  
  268. Non-sites (places which used to have graphics stuff, but do no longer):
  269.  
  270. albanycs.albany.edu [128.204.1.4]: no longer carries graphics stuff
  271. nl.cs.cmu.edu [128.2.222.56]: /usr/mlm/ftp/fbm.tar.Z - not found.  Michael
  272.     Maudlin <mlm@nl.cs.cmu.edu>
  273. panarea.usc.edu [128.125.3.54](not found?): archive for maps?
  274.  
  275. -------------------------------------------------------------------------------
  276.  
  277. RayShade Posting and Patches and Whatnot, by Craig Kolb
  278.  
  279. [Craig's excellent public domain ray tracer RayShade 3.0 has been posted to
  280. comp.sources.unix.  He has also just recently posted patch4, a set of fixes
  281. for this program.--EAH]
  282.  
  283. On the ray tracing front, I'm mulling over a total rewrite of rayshade, in an
  284. attempt to make it more flexible/extensible.  Mark and I are talking about
  285. tying together the scanline rendered he's working on with a new version of
  286. rayshade.  It would be nice if they shared a common modeling/texturing
  287. language, etc.  I think it could be quite nice if done correctly.
  288.  
  289. -------------------------------------------------------------------------------
  290.  
  291. Common Rendering Language, by Eric Haines
  292.  
  293. One question which I've received and seen posted on comp.graphics with some
  294. frequency is "what input format/language should I use for scene description?".
  295. As the inventor of NFF (Neutral File Format), I recommend AGAINST this
  296. language as your first choice.  Hey, I made for testing efficiency schemes -
  297. at one point I considered not even allowing the user to specify colors, but
  298. esthetics got the best of me.  You currently cannot specify light intensity.
  299. As it stands, I don't plan on extending NFF - the language is supposed to be as
  300. minimal as possible and is for testing efficiency schemes.
  301.  
  302. I'd recommend anyone interested in this question to look at Craig Kolb's
  303. RayShade language.  It's much fuller, includes many more primitives, texture
  304. functions, instancing, etc.  You could always pick a subset that you have
  305. implemented if the language is too extensive for your tastes.  One very nice
  306. thing provided with RayShade is an Awk script which translates NFF files to
  307. his format.
  308.  
  309. If you plan on making some money off of whatever you're doing, it's wise to
  310. look at RenderMan.  There are definitely some grey areas in the spec as to how
  311. certain functions actually perform (i.e.  what algorithm is used), as well as
  312. some procedures which force the use of certain algorithms (e.g.  shadow maps).
  313. But most of the language is reasonable and well thought out, the "RenderMan
  314. Companion" is readable (at least you won't have to write documentation if you
  315. choose this language), and certainly other companies are signing on to using
  316. this language.  Caveat:  good luck beating Pixar at its own game in the
  317. marketplace, especially with their years of lead time.
  318.  
  319. -------------------------------------------------------------------------------
  320.  
  321. Avoiding Re-Intersection Testing, by Eric Haines
  322.  
  323. The problem: when shooting a ray through a grid (3DDDA) or octree (or any other
  324. scheme which can put an object into more than one reference location), you
  325. encounter the problem of how to avoid performing the intersection test more
  326. than once for the same ray and same object.  For example, imagine you have a
  327. cylinder which overlaps two grid boxes.  Your ray enters the first grid box and
  328. is tested against the cylinder, missing it.  So, now your ray moves into the
  329. next grid box and the cylinder is listed in this second box.  Obviously, the
  330. ray missed this cylinder on the previous test.  You would like to avoid testing
  331. the cylinder against the ray again to save time.  How to do it?
  332.  
  333. There are some fairly bad solutions to this problem.  One is to keep a list of
  334. flag bits, one per object.  When an object is tested for intersection, the
  335. flag bit is checked:  if off, then it is set and the full test is performed.
  336. If on, then we know we've tested the ray against the object already and can
  337. move on.  The problem with this solution is that you must reset the flag bits
  338. after each ray, which can be a costly procedure.  For example, imagine you
  339. have 32000 objects in a scene.  Even with 32 bit words used for the flags, you
  340. have to reset 1000 words to zero before EACH ray.  There are variants on this
  341. scheme (e.g. you could store the locations to reset in a list, then simply
  342. reset just those in this list before the next ray), but happily there is a
  343. better solution with much less overhead.  [Note:  if you're really strapped
  344. for memory, you might still want to go with the above algorithm]
  345.  
  346. The algorithm:  keep a list of integers, one per object - call this the "hit
  347. list" (alternately, simply add this field to each object).  Initialize this
  348. list to zeroes.  Also keep a counter which counts the total number of rays
  349. generated, i.e. when a new ray is generated, the counter is incremented.  When
  350. a ray is to be tested against an object, check the object's hit list value.
  351. If this value does not match the ray's counter number, then set the hit list
  352. value to the ray's counter number and test the object.  If the hit list value
  353. matches the ray's number, then this object has already been tested by the ray.
  354. If you use 32 bit words in the list, you probably won't have to worry about
  355. the ray counter overflowing (2**32 rays is a lot).  However, you could even
  356. use byte length integers for the hit list.  When the ray counter reaches 256,
  357. then you reset the whole hit list to zero and reset the count to 1.  In some
  358. ways this technique is an extension of the flag bit technique, with the cost
  359. of a little more storage offset by the time savings of rarely (if ever) having
  360. to reset the flags.
  361.  
  362. Over the past few months I've noticed that there are still a few researchers
  363. who do not know about this technique.  Personally, I had to invent this
  364. algorithm for my own use, and others have no doubt done the same.  Asking
  365. around for references, I can see why people would not know about it.  The only
  366. reference that I know which mentions this algorithm is:
  367.  
  368. %A Bruno Arnaldi
  369. %A Thierry Priol
  370. %A Kadi Bouatouch
  371. %T A New Space Subdivision Method for Ray Tracing CSG Modelled Scenes
  372. %J The Visual Computer
  373. %V 3
  374. %N 3
  375. %D August 1987
  376. %P 98-108
  377. %K CSG
  378.  
  379. -------------------------------------------------------------------------------
  380.  
  381. Torus Equation Correction, by Pat Hanrahan
  382.  
  383. Pat took up my request last RTN to derive the ray/torus intersection equation
  384. on Mathematica.  He found that in fact Larry Gritz's & my derivation still had
  385. one small bug - I left out the subscript of z0 in the very last term of a0.  So,
  386. here's the final, correct equation (I hope).  --EAH
  387.  
  388.     a4 & a3 - Pat's are OK.
  389.         a2 = 2(x1^2+y1^2+z1^2)((x0^2+y0^2+z0^2)-(a^2+b^2)) 
  390.               + 4 * (x0x1+y0y1+z0z1)^2 + 4a^2z1^2
  391.     a1 = 4 * (x0x1+y0y1+z0z1)((x0^2+y0^2+z0^2)-(a^2+b^2))
  392.         + 8a^2 * z0 * z1
  393.     a0 = ((x0^2+y0^2+z0^2)-(a^2+b^2))^2 - 4a^2(b^2-z0^2)
  394.                             ^---I left this out
  395.  
  396. Pat sent me all of the equations in eqn format - here they are:
  397.  
  398. ----
  399. .EQ
  400. define x0 'x sub 0'
  401. define x1 'x sub 1'
  402. define y0 'y sub 0'
  403. define y1 'y sub 1'
  404. define z0 'z sub 0'
  405. define z1 'z sub 1'
  406. define r11 '( x1 sup 2 + y1 sup 2 + z1 sup 2 )'
  407. define r01 '( x0 x1 + y0 y1 + z0 z1 )'
  408. define r00 '( x0 sup 2 + y0 sup 2 + z0 sup 2 )'
  409. define r00ab '( r00 - ( a sup 2 + b sup 2 ) )'
  410. .EN
  411. .EQ
  412. a sub 4 ~=~ r11 sup 2
  413. .EN C
  414. .EQ
  415. a sub 3 ~=~ 4 r01 r11
  416. .EN C
  417. .EQ
  418. a sub 2 ~=~ 2 r11 r00ab + 4 r01 sup 2 + 4 a sup 2 z sub 1 sup 2
  419. .EN C
  420. .EQ
  421. a sub 1 ~=~ 4 r01 r00ab + 8 a sup 2 z sub 0 z sub 1
  422. .EN C
  423. .EQ
  424. a sub 0 ~=~ r00ab sup 2 - 4 a sup 2 ( b sup 2 - z sub 0 sup 2 )
  425. .EN
  426. ----
  427.  
  428. -------------------------------------------------------------------------------
  429.  
  430. "Introduction to Ray Tracing" Shading Model Errata, by Kathy Kershaw
  431.  
  432. p.148, section on distribution term D, 8th line, should say that alpha is the
  433. angle between N and H.
  434.  
  435. p.156, section 5.4, 2nd paragraph:  I think Andrew meant "specular
  436. transmission curve".
  437.  
  438. p.158, in F_dt(lambda) and eq 24 it says "diffuse reflection" instead of
  439. "diffuse transmission" and "diffuse reflectance" instead of "diffuse
  440. transmittance".
  441.  
  442. -------------------------------------------------------------------------------
  443.  
  444. Comments on Last Issue, by Mark VandeWettering
  445.  
  446. Glad to see that you spent the time to include the MTV raytracer in your
  447. timings.  I was meaning to compare them myself at some time, but lacked the
  448. time to do so.
  449.  
  450. You might be interested to know that I have eeked out a little time to make
  451. some modifications to the MTV raytracer.  In particular, I too have switched
  452. to an Goldsmith-Salmon hierarchy generating scheme.  It's been a while since I
  453. benchmarked this one against the one that is available for ftp, but I did
  454. realize significant speedups.  I added some primitive support for super
  455. ellipsoids and "blocks" as well.
  456.  
  457. The main reason that I haven't released these changes is simple:  Craig Kolb's
  458. raytracer is too good :-) It really is a slick piece of programming.  If it
  459. had 2-d texture mapping, it would be ideal for a large variety of image
  460. rendering tasks.
  461.  
  462. I also think that more adaptive methods (particularly K-K bounding volumes)
  463. are better under a wide variety of image rendering tasks.  Maybe I should
  464. construct an nff file for the "teapot in a stadium" idea and restore some of
  465. the dignity that the MTV raytracer had by kicking some sand back in Craig's
  466. face :-)
  467.  
  468. Another place where the MTV raytracer probably falls short is that for
  469. primitive objects, I still take the trouble to intersect their bounding
  470. volumes.  For simple, tightly bounded objects like spheres, this is pretty
  471. wasteful.  Craig's code is fairly careful to weed those out.
  472.  
  473. If I had a good block of time, I would like to go back and 'do it all over'
  474. with texture mapping primitives and other niceties.  But now that I am out in
  475. the pseudo-real world of Princeton, such blocks of time are hard to come by.
  476.  
  477. Ah, if one only had infinite time.
  478.  
  479. Anyway, just an update from this side of the world.
  480.  
  481. -------------------------------------------------------------------------------
  482.  
  483. An Improvement to Goldsmith/Salmon, by Jeff Goldsmith
  484.  
  485. [Background:  as written Goldsmith & Salmon's automatic bounding volume
  486. hierarchy generation algorithm (ABVH) has two insertion methods for an object:
  487. an object can become a new sibling of an existing bounding box, or a new
  488. bounding box can be created which replaces one of the existing siblings, and
  489. the existing sibling and object are put in this new bounding box.]
  490.  
  491.     A new case for the ABVH programs:  First insertion check-- consider the
  492. new node to be a sibling of the current root node.  That is, consider making a
  493. new root with two children, one being the current root, and the other the new
  494. node.  This should have a cost of 2*Area(new root).  Everything else is the
  495. same, but this adds a case that I forgot and allows for less bushy roots when
  496. you need them.
  497.  
  498.     I haven't tested this, and I'm not completely convince that 2A is the
  499. right cost, but I think it is.  Since you use this algorithm, I'd appreciate
  500. some trials to see if it ever happens and if it has a (predicted at least)
  501. beneficial result on the final tree.
  502.  
  503.     By the way, Pete Segal inspired the idea.
  504.  
  505. [In fact, I tried this out some time ago.  The thrust of Jeff's comments are
  506. that at the root node, the root can only get bushier (more sons added) or
  507. else objects are added to existing sons which have little relation to those
  508. existing sons.  His third case is to consider the root node itself a sibling
  509. of some imaginary "father of the root" (which has only the root as its son and
  510. is the same dimensions).  In this way, the object could also be added to this
  511. "father" and not cause the root to become bushy.
  512.  
  513. This explanation implies a simple change to existing code:  simply create this
  514. "father of the root" node at the start, and any time the above condition of a
  515. sibling being added to this father occurs, again create the father for this
  516. new root (i.e. that used to be the father of the root).
  517.  
  518. As an example, imagine some complicated scene that contains five spheres as
  519. light sources.  The light sources are some distance outside the rest of the
  520. scene, i.e. not in the bounding volume containing this data.  You now try to
  521. add these light sources.  Under the old algorithm these lights would normally
  522. get added as separate siblings of the root node.  So, when ray tracing, you
  523. would always attempt to intersect all of these light sources when you first
  524. looked in the root box.  The new algorithm should cause the root to be less
  525. bushy and the lights may become a subcluster.  At least in theory - I still
  526. want to think about it some more...--EAH]
  527.  
  528. -------------------------------------------------------------------------------
  529.  
  530. Fiddling with the Normal Vector, by H. 'ZAP' Anderson
  531.     (y88.l-karvonen@linus.ida.liu.se)
  532.  
  533.     When I Wrote my first raytracer, it was in Basic, only spheres, one
  534. lightsource, checkered ground, and rather primitive.  A while has passed since
  535. then, and I have put behind me quite a few years of Raytracing both in my mind
  536. and in my computer.  Not being fortunate enough to own a Cray III, or even a
  537. VAX 11/780, but a mere CompaQ 386/20e, I have a certain passion for tricks
  538. that enhance the picture quality without adding to the calculation time.  So,
  539. besides Texture Mapping, my favorite hat trick, is 'Fiddling with the Normal
  540. Vector'
  541.  
  542.     My first trick, is the simplest, and in my opinion the best (isn't it
  543. always so?).  But first, some history:  WHAT is it the human eye want's to
  544. see?  WHAT make's a picture look 'real'?  What makes a picture 'feel'
  545. realistic?  There are, of course, MANY answers, but one of them is:  Specular
  546. Highlights.
  547.  
  548.     I was at a demo at Hewlett Packard in Stockholm, and they showed me (with
  549. badly hidden pride :-) their TurboSRX solids rendering engine.  When the demo
  550. guy started to spin nurbs and superquadrics in realtime before my very eyes,
  551. those eyes fell upon the specular highlights on the surfaces.  They moved along
  552. as the surface twisted, and i thought:  'gosh, THAT looks real!'  Something
  553. VERY important for the eye, and our mind, to really 'feel' the solidity of an
  554. object, is when the specular highlights crawl around it's surface as we twist
  555. them (sorry for you Radiosity fans :-).  But WHY does a computer image need
  556. more specular highlights?  Aren't those only seen on cylinders and spheres, and
  557. perhaps (in a lucky instance) on another surface?  The answer is a very very
  558. big NO!
  559.  
  560.     Consider a coin.  Place it on the table in front of you.  Basically, this
  561. coin is a rather short cylinder.  And if we would render it as such, it would
  562. look no way like a coin.  Why is that?  Clue:  The microscope!  As we watch
  563. closely, we see, that the coins edge is a bit rounded by years of transfer on
  564. the black market.  The coin on your table almost ALWAYS have SOME part of it's
  565. edge in a direction that mirrors light, and you have a specular highlight.
  566. Taken further, this applies to ALL edges.  NO edge in natural life is an exact
  567. 90 degree edge.  ALL edges are a bit rounded, and therefore has a big
  568. probability of generating a specular highlight.  Just look around the room, and
  569. you'll know I'm right.
  570.  
  571.     Here goes the simple trick.  Imagine a cylinder in the XY plane with a
  572. radius of 10 and a height of 10.  When we want to obtain the normal vector, we
  573. normally get one pointing straight up (for the top face) and one pointing in
  574. one direction in the XY plane, depending on intersection point.  This gives us
  575. the simple cylinder, and nothing like the coin mentioned above.  BUT if we now
  576. twiddle a bit with our famous Normal Vector, so IF we hit the cylinder close
  577. to the top face (say .1 of cylinder height) we gently tweak the normal vector
  578. upwards, scaled such, that when we reach the top face exactly, we have twisted
  579. it UP along the Z axis 45 degrees.  Now do the same for the top face.  When
  580. you approach the edge of the cylinder, maybe .9 of the radius, you gently
  581. twiddle the little N vector outwards, again, scaled to obtain 45 degrees
  582. exactly at the edge.  The result:  A cylinder with a rounded edge, without
  583. extra calculation time or extra surfaces!!  I have implemented this myself,
  584. and the resulting increase in image quality is stunning.  Everything that once
  585. looked like synthetic and unreal cylindric objects, now turns out to look VERY
  586. real, once they get that little extra shine on the edge.  This, of course,
  587. applies to ALL edges, and are just as simple to implement on other primitives.
  588.  
  589.     Another 'Normal Vector Tricky' is the 'Modified surface smoothing' I use.
  590. Consider a staircase looking surface, and 'standard' smoothing, with one
  591. normal per vertex:  (now watch Fig 1!!)
  592.  
  593. Fig. 1                                 Fig. 2
  594.                                    
  595.      I      N12     N23                I
  596.      I    /       /                    I--N1  N2
  597.      I  /       /                      I      I
  598.      I/       /                        I      I       
  599.      ---------                         --------------
  600.              I                                      I
  601.              I                                      I---N3
  602.              I                                      I
  603.  
  604.     Imagine the standard smoothing applied to this surface.  The surface
  605. between the 'vertex normals' N12 and N23 would be shaded as if it ALL had a
  606. normal vector same as N12 (or N23)!!  That isn't correct, is it?  Behold Fig.
  607. 2!  With one normal vector per surface, but smoothing from the center of
  608. surface 1 to the center of surface 2, then smooth onwards from surf.  2 to
  609. surf.  3, you will get a better result, PLUS you save yourself the trouble of
  610. keeping interpolated vertex normals!
  611.  
  612.     Now, no 'real' surfaces are perfect.  Take a close look at your
  613. neighbours' ferrari in sunlight.  You will see that even if it isn't a perfect
  614. spline, nurb, or anything like that.  This can be simulated with gentle
  615. surface rippling a la' DBW-render, or by actually MAKING the surface
  616. non-perfect.  But there is another way.  When interpolating normals, you may
  617. use other functions than standard linear interpolation.  Maybe use the square
  618. root of the distance to the normals, or the distance squared?  This will yield
  619. a surface 'not so smooth' as a perfectly smoothed may be, something to
  620. consider?
  621.  
  622.     Another thing I am currently trying to implement in my tracer, is
  623. something I have called 'profile mapping' (you may have been using a different
  624. term?)  where I supply a 2d description of normal-vector-tweaking as a
  625. function of local surface coordinates.  Simply put:  Texture mapping for the
  626. Normal.  I may be able to generate the engravings on our coin in the previous
  627. example, or other subtle surface characteristics.  Has anyone any experience in
  628. this field?  Please let me know!
  629.  
  630.     And finally, a question:  I would very much like to implement Octrees in
  631. my tracer, but I haven't REALLY understood how this works.  Could somebody, in
  632. a few words, explain the basics for little o'l me?
  633.  
  634. ThanX in advance!!  /H 'ZAP'
  635.  
  636. -------------------------------------------------------------------------------
  637.     
  638. A Note on Texture Sampling, by Eric Haines
  639.  
  640. [this is edited from a note I wrote to `Zap' Anderson about sampling texture
  641. maps.  I hope it helps someone out there to understand the problem a bit
  642. better.]
  643.  
  644.     There are two problems that need solving when using texture maps:
  645. interpolation (aka magnification) and decimation.  Interpolation is needed
  646. whenever less than one texel (a sample on a texture map) covers a pixel.
  647. Decimation is needed when more than one texel falls into a pixel.  Actually,
  648. the number is really "2 texels or less/more", due to the Nyquist frequency
  649. (see Heckbert's thesis), but forget that for now.
  650.  
  651.     Interpolation is relatively easy:  if a texel covers more than one
  652. pixel, then we should consider the texture map (if it's an image) to be
  653. representing a continuous sampling of something (e.g. the mandrill).  So,
  654. each texel is just a sample along a continuous function.  In this case, when
  655. we hit such a texel, we take the exact location on the function and
  656. interpolate the color from the nearby texels (e.g. you could use bilinear
  657. interpolation, which usually works well enough).  Note that you might not
  658. always want to interpolate, e.g. if your map is a checkerboard, then you may
  659. want the sharp edges between the squares, not blurred edges.
  660.  
  661.     Decimation is where the fun begins:  you want to take the values of
  662. all the texels in the pixels and blend them.  You also want to do this
  663. quickly, i.e. if 10,000 texels fall in the pixel, you want to quickly get
  664. the sum of all of these samples.  This usually means doing some preprocess
  665. like mipmapping - see Lance Williams' paper in SIGGRAPH 83, first article.
  666. There are lots of other schemes (this topic is one of the great paper
  667. generators), see Paul Heckbert's thesis (highly recommended) on this.
  668.  
  669. [Zap talked about what you should use as your criteria for anti-aliasing: edge
  670. detection or luminosity differential (i.e. color change)]
  671.  
  672.     Edge vs. luminosity difference detection is an interesting question:
  673. you actually probably want both, sorta.  Doing all the edges might be overkill,
  674. since you could have something like a car body made of 36,000 polygons, with
  675. each polygon being almost exactly the shade of the next one (esp. with
  676. interpolated normals at the corners).  In this case, edges are a waste of time,
  677. and you probably also want a threshhold luminosity to use for checking if the
  678. edge is worth antialiasing.
  679.  
  680. -------------------------------------------------------------------------------
  681.  
  682. Unofficial MTV Patches, by Eric Haines
  683.  
  684. These are the patches I've personally made to the MTV ray tracer, from bugs
  685. that Mark VandeWettering has noticed and from my own experience.  They are
  686. unofficial patches, and Mark hopes to have official ones out sometime.
  687. The patches fix a cylinder rendering bug and a coredumping bug in the box
  688. intersector.  There are also fixes to make the statistics more descriptive.
  689.  
  690. old/data.c
  691. new/data.c
  692. 32a33
  693. > /* Mark's default prune value
  694. 33a35,36
  695. > */
  696. > Flt        minweight = 0.0 ;    /* no pruning */
  697. old/antialiasing.c
  698. new/antialiasing.c
  699. 23a24
  700. > /* >>>>>
  701. 24a26,27
  702. > */
  703. > #define MAXRAND        (32767.0)
  704. 28a32
  705. >     /* >>>>>
  706. 29a34,35
  707. >     */
  708. >     return (((Flt) rand ()) / ((Flt) MAXRAND));
  709. old/main.c
  710. new/main.c
  711. 43a44,46
  712. >     /* >>>>> */
  713. >     srand(10001) ;
  714. 109c112
  715. <     printf("number of rays cast:       %-6d\n", nRays);
  716. ---
  717. >     printf("number of eye rays:       %-6d\n", nRays);
  718. 121a125,152
  719. > }
  720. > /* >>>>> */
  721. > char *
  722. > rindex(sp, c)
  723. >      register char *sp, c;
  724. > {
  725. >   register char *r;
  726. >   r = NULL;
  727. >   do
  728. >     {
  729. >       if (*sp == c)
  730. >     r = sp;
  731. >     } while (*sp++);
  732. >   return(r);
  733. > }
  734. > char *
  735. > index(sp, c)
  736. >      register char *sp, c;
  737. > {
  738. >   do
  739. >     {
  740. >       if (*sp == c)
  741. >     return (sp);
  742. >     } while (*sp++);
  743. >   return (NULL);
  744. old/cone.c
  745. new/cone.c
  746. 242a243
  747. 244a246,248
  748. >     VecNormalize(cd -> cone_u) ;
  749. >     VecNormalize(cd -> cone_v) ;
  750. old/intersect.c
  751. new/intersect.c
  752. 61a62,64
  753. >         /* check if ray is not parallel to slab */
  754. >         if ( den[i] != 0.0 ) {
  755. 80a84,89
  756. >         } else {
  757. >         /* ray is parallel to slab - see if it is inside slab */
  758. >         if ( ( obj -> o_dmin[i] - num[i] ) *
  759. >             ( obj -> o_dmax[i] - num[i] ) > 0.0 )
  760. >             return ;
  761. >         }
  762. 104a114
  763. >     Flt        dendot ;
  764. 113c123,128
  765. <         den[i] = 1.0 / VecDot(ray -> D, Slab[i]) ;
  766. ---
  767. >         dendot = VecDot(ray -> D, Slab[i]) ;
  768. >         if ( dendot != 0.0 ) {
  769. >             den[i] = 1.0 / dendot ;
  770. >         } else {
  771. >             den[i] = 0.0 ;
  772. >         }
  773. old/screen.c
  774. new/screen.c
  775. 50d49
  776. <     VecNormalize(upvec) ;
  777. 66a66,72
  778. >      * Make sure the up vector is perpendicular to the view vector
  779. >      */
  780. >     VecCross(viewvec, leftvec, upvec);
  781. >     VecNormalize(upvec);
  782. >     /*
  783. 71c77
  784. <     frustrumwidth = (view -> view_dist) * ((Flt) tan(view -> view_angle)) ;
  785. ---
  786. >     frustrumwidth = ((Flt) tan(view -> view_angle)) ;
  787. 129c135
  788. <             Trace(0, 1.0, &ray, color);
  789. ---
  790. >             Trace(0, 1.0, &ray, color, &nRays);
  791. 173c179
  792. <             Trace(0, 1.0, &ray, color);
  793. ---
  794. >             Trace(0, 1.0, &ray, color, &nRays);
  795. 238c244
  796. <                 Trace(0, 1.0, &ray, color);
  797. ---
  798. >                 Trace(0, 1.0, &ray, color, &nRays);
  799. old/shade.c
  800. new/shade.c
  801. 112d111
  802. <         nReflected ++ ;
  803. 115c114,115
  804. <         Trace(level + 1, surf -> surf_ks * weight, &tray, tcol);
  805. ---
  806. >         Trace(level + 1, surf -> surf_ks * weight, &tray, tcol,
  807. >             &nReflected);
  808. 120d119
  809. <         nRefracted ++ ;
  810. 125c124,125
  811. <         Trace(level + 1, surf -> surf_kt * weight, &tray, tcol) ;
  812. ---
  813. >         Trace(level + 1, surf -> surf_kt * weight, &tray, tcol,
  814. >             &nRefracted) ;
  815. old/trace.c
  816. new/trace.c
  817. 19c19
  818. < Trace(level, weight, ray, color) 
  819. ---
  820. > Trace(level, weight, ray, color, nr) 
  821. 23a24
  822. >  int *nr ;
  823. 34c35
  824. <     nRays ++ ;
  825. ---
  826. >     (*nr) ++ ;
  827.  
  828. ======== USENET cullings follow ===============================================
  829.  
  830. OFF Databases, by Randi Rost
  831.  
  832. Wondering where to get the famous teapot data?
  833.  
  834. As a service to the graphics community, Digital Equipment Corporation has
  835. donated disk space and established an archive server to maintain a library of
  836. (somewhat) interesting objects.  The objects collected are in OFF format.
  837. Documentation on OFF, a library of useful OFF routines, and one or two useful
  838. OFF utilities are also available through this archive server.
  839.  
  840. The archive server lets you obtain ASCII files across the network simply by
  841. sending electronic mail.  To obtain help about using this service, send a
  842. message with a "Subject:"  line containing only the word "help" and a null
  843. message body to:
  844.  
  845.     object-archive-server@decwrl.dec.com
  846.  
  847. To get an index of all that is available through this server, use a subject
  848. line of "send index" instead of "help".  To get a list of objects that are
  849. available use a subject line of "send index objects" and a null message body.
  850.  
  851. In order to save disk space and transmission time, the more lengthy files
  852. available through this archive are compressed using the UNIX "compress"
  853. utility and then uuencoded so that they may be sent as ASCII files.  For those
  854. of you who don't have access to these utilities, buddy up to someone who does.
  855.  
  856. As with other archive servers, it is only possible to get small portions of
  857. the database at a time.  Small requests have priority over large ones.  If you
  858. have ftp access, you can copy all of the objects and OFF programs from the
  859. file ~pub/DEC/off.tar.Z on the machine gatekeeper.dec.com.
  860.  
  861. Please respect the copyright notices attached to the objects in the .off
  862. header files.  The original author usually worked pretty hard to create the
  863. model, and deserves some credit when it is displayed.  If anyone out there
  864. knows something about any of the objects I've left uncredited, please let me
  865. know so that I can include the appropriate credits.
  866.  
  867. We'd *LOVE* to add to this collection of useful programs and objects.  If
  868. you'd like to submit an object, an OFF program, or an OFF converter of some
  869. type for inclusion in the archive, send mail to:
  870.  
  871.     object-archive-submit@decwrl.dec.com
  872.  
  873. We cannot guarantee anything about when submissions will be made available as
  874. part of the object archive, since maintaining the archive is an after-hours
  875. activity.  We can only promise that an interesting or useful object that is
  876. already in OFF format will make it into the archive more quickly than one that
  877. has to be converted from another format and then tested.  To report problems
  878. with the archive server, send mail to:
  879.  
  880.     object-archive-manager@decwrl.dec.com
  881.  
  882. This same archive server will also be used to distribute Benchmark Interface
  883. Format (BIF) files for the Graphics Performance Characterization (GPC)
  884. Picture-Level Benchmark (PLB).  These files contain commands that define how a
  885. picture or sequence of pictures is to be drawn.  The time it takes to process
  886. the BIF file on a particular platform can be measured.  It is therefore
  887. possible to create a BIF file that mimics the behavior of your favorite
  888. application area, process it on several platforms to which the PLB code has
  889. been ported, and get an apples-to-apples comparison of exactly the type of
  890. graphics performance that interests you most.
  891.  
  892. It is planned to release the PLB code and a sample set of BIF files at NCGA
  893. '90.  When this happens, these things will be available as part of the object
  894. archive server, as well as by ftp access from gatekeeper.  People that are
  895. interested in finding out more about PLB and BIF should contact Dianne Dean at
  896. NCGA, 2722 Merrilee Drive, Suite 200, Fairfax, VA 22031, (703) 698-9600 and
  897. request the most current BIF spec.  We are also interested in redistributing
  898. interesting BIF files that people develop, or programs that convert other
  899. database types to BIF.  Such submissions should also be mailed to
  900. object-archive-submit@decwrl.dec.com.
  901.  
  902. Finally, we have added to the graphics bibliography that is also available
  903. through decwrl.  Bibliographies from the years 1976-1981, 1983, and 1985-1986
  904. are now available for use with the graf-bib server.  This server can be
  905. accessed in the same manner as the object archive server by sending mail to:
  906.  
  907.     graf-bib-server@decwrl.dec.com
  908.  
  909. The years 1982 and 1984 have been received and await further editing before
  910. they can be included.  We hope to make them available by the end of the month
  911. as well.  The bibliographies will also be available for ftp access from
  912. gatekeeper once they are all ready to go.  For more information on using the
  913. graf-bib server, see the April 1989 issue of Computer Graphics, pp.  185-186.
  914.  
  915. Randi J. Rost, rost@granite.dec.com
  916. Workstations Advanced Technology Development
  917. Digital Equipment Corporation
  918.  
  919. -------------------------------------------------------------------------------
  920.  
  921. VM_pRAY is now available, by Didier Badouel
  922.  
  923. >From: badouel@irisa.irisa.fr (Didier Badouel)
  924.  
  925. VM_pRAY (Virtual Memory parallel RAYtracer) is a parallel raytracer (using NFF
  926. file format) running on an iPSC/2 and emulating a read-only shared memory.
  927.  
  928. VM_pRAY is now available from our site (irisa.fr (131.254.2.3)) by anonymous
  929. ftp access.
  930. ________________________________________
  931. ftp 131.254.2.3
  932. Name (131.254.2.3:yourname): anonymous
  933. Password: <your ident>
  934.  
  935. ftp>cd iPSC2/VM_pRAY
  936. ftp>ls
  937. VM_pRAYjan90.tar.Z
  938. spirale.nff.Z
  939. teapot.nff.Z
  940. ftp>mget *
  941. ftp>quit
  942.  
  943. uncompress *
  944. tar -xvf VM_pRAYjan90.tar
  945. _______________________________________
  946.  
  947. If you don't have ftp access, send me an e-mail; I will send you this software
  948. by return.
  949.  
  950. As I refer in the README file, I maintain a mailing list to inform interested
  951. persons of future VM_pRAY releases or patches.  For this reason, I would like
  952. to get feedback from those who get this software.
  953.  
  954. Thanks.
  955. ________________________________________________________________
  956.   Didier  BADOUEL                       badouel@irisa.fr
  957.   INRIA / IRISA                         Phone : +33 99 36 20 00
  958.  Campus Universitaire de Beaulieu       Fax :   99 38 38 32
  959.  35042 RENNES CEDEX - FRANCE            Telex : UNIRISA 950 473F
  960. ________________________________________________________________
  961.  
  962. -------------------------------------------------------------------------------
  963.  
  964. Superquadrics, by Prem Subrahmanyam, Patrick Flynn, Ron Daniel, and
  965.     Mark VandeWettering
  966.  
  967. >From: daniel@a.cs.okstate.edu (Daniel Ronald E )
  968. Newsgroups: comp.graphics
  969. Subject: Re: Superquadrics
  970. Organization: Oklahoma State Univ., Stillwater
  971.  
  972. >From article <5991@cps3xx.UUCP>, by flynn@pixel.cps.msu.edu (Patrick J. Flynn):
  973. > In article <438@fsu.scri.fsu.edu> prem@geomag.gly.fsu.edu (Prem Subrahmanyam) writes:
  974. >>     One of the new shapes that [DBW_render] supports is called a 
  975. >>     superquadric.  Now, I've attempted to look up info in IEEE CG&A about
  976. >>     them and found out that the first issue ever to come out had an article
  977. >>     about these, however, our library does not have this issue.  So, can   
  978. >>     anyone point out another source for info about these (the full equation
  979. >>     used for them, and how to do a ray-superquadric intersection (complete
  980. >>     with normal calculation for a given point))?  Thanks in advance......
  981. > Parametric form for a point on a superquad.:
  982. > Let c(e,x) = (cos x)^e
  983. >     s(e,x) = (sin x)^e
  984. > (x(u,v),y(u,v),z(u,v)) = ( c(e1,u)*c(e2,v) , c(e1,u)*s(e2,v), s(e1,u) )
  985. > u and v are parameters of latitude and longitude.  The parameters e1 and
  986. > e2 control the shape of the primitive obtained when you sweep u and v
  987. > over the sphere.  The normal can be obtained by differentiation.
  988. > . . . 
  989. > Patrick Flynn, CS, Mich. State U., flynn@cps.msu.edu
  990.  
  991. The nice thing about superquadrics is that a wide range of shapes can be
  992. represented by varying only two parameters - e1 and e2.  Cubes, cylinders,
  993. spheres, octahedrons, and double-ended cones are all special cases of a
  994. superquadric.  All of the intermediate shapes are also available.
  995.  
  996. The equation for the normal vector of a superquadric (SQ) as a function of
  997. longitude and latitude is:
  998.  
  999.     (Nx(u,v),Ny(u,v),Nz(u,v)) =
  1000.        ( c(2-e1,u)*c(2-e2,v)/a1 , c(2-e1,u)*s(2-e2,v)/a2, s(2-e1,u)/a3 )
  1001.  
  1002. where e1, e2, u, and v are as before and a1, a2, a3 are the scale factors for
  1003. the x,y, and z dimensions of the SQ.  Unfortunately, both these equations
  1004. require knowledge of u and v, which is not available for ray-tracing
  1005. algorithms.
  1006.  
  1007. A more useful formulation is the implicit equation for superquadrics:
  1008.  
  1009.     F(x,y,z) = ((x/a1)^(2/e1) + (y/a2)^(2/e2))^(e2/e1) + (z/a3)^(2/e1)
  1010.  
  1011. (Note that if e1=e2=0, this degenerates to the implicit equation for a
  1012. sphere.)  This equation is for a superquadric centered at the origin, use
  1013. standard transformations to translate and rotate it into world coordinates.
  1014. If the point (x,y,z) is on the surface of the SQ, F=1.  If (x,y,z) is inside
  1015. the SQ surface, F < 1.  If (x,y,z) is outside the SQ surface, F > 1.  Ray-
  1016. object intersections can be solved by finding zeros of the function (F-1).
  1017. Standard techniques such as Newton or secant methods can be used to find the
  1018. zeros, but they need some help.  Depending on the values of e1 and e2, there
  1019. can be from 0 to 4 roots.  Finding the closest root can be difficult.  The '89
  1020. SIGGRAPH proceedings has an article on restricting the search space of the
  1021. root-finder to an area that bounds the first intersection.  This technique
  1022. will work for any implicit surface, not just superquadrics.  The article is:
  1023.  
  1024.     Devendra Kalra and Alan Barr, "Guaranteed Ray Intersections with Implicit
  1025.     Surfaces", Computer Graphics, Vol.  23, No.  3, July 1989, pp.  297-306.
  1026.  
  1027. The expression for the normal vector as a function only of x,y,z (not u,v) is
  1028. more complex.  It can be obtained from the cross-product of the tangent
  1029. vectors along the lines of latitude and longitude.  The derivation is
  1030. presented in an appendix of
  1031.  
  1032.     Franc Solina, "Shape Recovery and Segmentation with Deformable Part
  1033.     Models", GRASP Lab Tech. Rept. 128, Dept. Comp. and Info. Sci., U.
  1034.     Penn, Philadelphia, PA., Dec. 1987.
  1035.  
  1036. This is Franc's PhD dissertation, so it should also be available from
  1037. University Microfilms.  The results of the normal vector derivation are:
  1038.  
  1039.    nx = 1/x [1-(z/a3)^(2/e1)][(x*a2/y*a1)^(2/e2) / (1+(x*a2/y*a1)^(2/e2))]
  1040.    ny = 1/y [1-(z/a3)^(2/e1)][ 1 / (1+(x*a2/y*a1)^(2/e2))]
  1041.    nz = 1/z (z/a3)^(2/e1)
  1042.  
  1043. If your library does not have the first issue of IEEE CG&A you should have
  1044. them issue an Inter-Library loan request for a copy of Barr's article.  It has
  1045. a lot of good stuff in it about other superquadric shapes, such as super-
  1046. toroids.  There is also another article that same year by Franklin and Barr,
  1047. sorry that I don't have that reference handy - it is at the office.  However,
  1048. it deals more with generating fast polyhedral tilings of SQs, rather than with
  1049. Ray-traced rendering of them.
  1050.  
  1051. Hope this helps.
  1052.  
  1053. Ron Daniel Jr.                            Electrical and Computer Engineering
  1054. (405) 744-9925                            202 Engineering South
  1055. daniel@a.cs.okstate.edu (preferred)       Oklahoma State University
  1056. daniel@rvax.ecen.okstate.edu              Stillwater, OK      74078
  1057.  
  1058. --------
  1059.  
  1060. >From: markv@gauss.Princeton.EDU (Mark VandeWettering)
  1061. Organization: Princeton University
  1062.  
  1063. Ron Daniels gave a very good article on super quadrics, very informative.  I
  1064. thought I would just toss in the (probably obvious) information.
  1065.  
  1066. Super ellipsoids are a useful special subcase of the general super quadric
  1067. equations.  Their interesting geometric property is that they are all convex.
  1068. The following ray intersection strategy works rather well, and was implemented
  1069. by me, so I know it works :-) The only real limitation is that you eye should
  1070. be "outside" the superquadric.
  1071.  
  1072. For a sphere, its implicit equation is 
  1073.     F(x, y, z) = x^2 + y^2 + z^2
  1074.  
  1075. If F(x, y, z) < 1.0, then you are inside the sphere, otherwise, you are
  1076. outside.  You could perform intersection with a sphere by:
  1077.     1.      finding the close approach of the ray with the origin call
  1078.         this xc, yc, zc
  1079.     2.      if F(xc, yc, zc) < 1.0, we have an intersection, but we don't
  1080.         know where.
  1081.     3.      For a sphere, there is actually a formula for finding these
  1082.         intersections.  Alternatively, we have a point which is
  1083.         outside (the ray origin) and a point which is inside (xc, yc,
  1084.         zc).  Because the sphere is convex, we know that there is
  1085.         precisely one point in between for which F(x,y,z) = 1.0, which
  1086.         we find by binary searching the ray.
  1087.  
  1088.  
  1089. You can perform the analogous algorithm on superquadrics, and it works the
  1090. same way.  The implicit function for superquadrics was given by Daniels as:
  1091.  
  1092. F(x,y,z) = ((x/a1)^(2/e1) + (y/a2)^(2/e2))^(e2/e1) + (z/a3)^(2/e1)
  1093.               ^^ error, should be e2....
  1094.  
  1095. For simplicity, we can pretend that a1 = a2 = a3 = 1.0.  (These scale in each
  1096. of the 3 directions, and we can handle that easier with transformation
  1097. matrices, which we would need to have to rotate these anyway, so no loss)
  1098.  
  1099. F(x, y, z) = (x^(2/e2) + y^(2/e2))^(e2/e1) + z^(2/e1)
  1100.  
  1101. If F(x,y,z) < 1.0, then we are inside the super quadric, else we are outside.
  1102. So, the algorithm runs as follows:
  1103.  
  1104.     1:      determine the ray closest approach to the origin.  call this
  1105.         point xc, yc, zc
  1106.     2:      if F(xc, yc, zc) is < 1.0, then you have a guaranteed hit,
  1107.         because xc, yc, zc is inside the quadric, and your eye is
  1108.         "outside".
  1109.     3:      because you know have a inside point and an outside point, and
  1110.         you know there is a single root in between, you can find it
  1111.         quite easily by binary searching.  Half the interval, check to
  1112.         see whether the midpoint is inside or outside, and collapse
  1113.         the other interval until some closeness criteria is met.
  1114.  
  1115. In practice, your eye may be far away from the super ellipsoid to start, you
  1116. can substitute any outside point for you eye, I use the point where the ray
  1117. intersected the bounding box, which I have anyway.
  1118.  
  1119. As long as you stick to the convex forms, (spheres, rounded boxes & cylinders,
  1120. octahedra) this method works quite well.
  1121.  
  1122. -------------------------------------------------------------------------------
  1123.  
  1124. Graphics Textbook Recommendations, by Paul Heckbert, Mark VandeWettering, and
  1125.     Kent Paul Dolan
  1126.  
  1127. >From: ph@miro.Berkeley.EDU (Paul Heckbert)
  1128.  
  1129. It's been a while now since Newman&Sproull and Foley&van Dam came out, and
  1130. most of the graphics textbooks since then are either good but
  1131. non-comprehensive (e.g. Rogers), or were written by typographic idiots for a
  1132. readership of PC-hacking kindergarteners.
  1133.  
  1134. So I was pleasantly surprised to run across a couple of new graphics textbooks
  1135. that are at the same time (1) current, (2) comprehensive, and (3) competent,
  1136. (4) not overloaded with graphics standards pap.  They are:
  1137.  
  1138. %A Alan Watt
  1139. %T Fundamentals of Three-Dimensional Computer Graphics
  1140. %I Addison-Wesley
  1141. %C Wokingham, England
  1142. %D 1989
  1143. Discusses radiosity, functionally-based modeling, stochastic sampling, and
  1144. Fourier theory, among other topics.
  1145.  
  1146. %A Peter Burger
  1147. %A Duncan Gillies
  1148. %T Interactive Computer Graphics: Functional, Procedural,
  1149. and Device-Level Methods
  1150. %I Addison-Wesley
  1151. %C Wokingham, England
  1152. %D 1989
  1153. Discusses color image quantization, quaternions, and soft (blobby) objects,
  1154. among many other topics.
  1155.  
  1156. I haven't read these books, but I was favorably impressed while browsing them
  1157. in the bookstore.  Has anybody else run across these books?  Are there other
  1158. undiscovered gems out there?
  1159.  
  1160. Paul Heckbert, CS grad student
  1161. 508-7 Evans Hall, UC Berkeley        INTERNET: ph@miro.berkeley.edu
  1162. Berkeley, CA 94720            UUCP: ucbvax!miro.berkeley.edu!ph
  1163.  
  1164. --------
  1165.  
  1166. Aye, I was actually going to suggest that they be added above all others to
  1167. the Frequently Asked Questions Posting, but you beat me to it.  I really like
  1168. the Watt book, and Burger and Gillies is also a good introductory text, much
  1169. better than the old Foley & Van Dam, or Rogers (my old standby) in my opinion.
  1170. I liked Watt's book so much when my sister's dog ate it over Christmas break,
  1171. I immediately replaced it :-)
  1172.  
  1173. Both books have good sections about raytracing, and would make a good addition
  1174. to your reference shelf.
  1175.  
  1176. Mark T. VandeWettering
  1177.  
  1178. --------
  1179.  
  1180. After a brief gloss over the book (I looked at the contents, figures,
  1181. listings, appendices, read the intro), this is the perfect transition for me
  1182. from moving clipped 3D wireframe graphics, which I've done, to rendering.
  1183.  
  1184. Watt takes the reader step by step through:
  1185.  
  1186. the basics (a simple 3D model, transformations, deformations, viewing systems,
  1187. the viewing pipeline);
  1188.  
  1189. reflection models (Phong, Cook & Torrance);
  1190.  
  1191. shading (Gouraud & Phong);
  1192.  
  1193. rendering (rasterization, hidden surface, composite models);
  1194.  
  1195. parametric representations (curves, surfaces, scan conversion);
  1196.  
  1197. ray-tracing (recursion, intersections, reflections & refraction, illumination,
  1198. shadows, distributed processing, anti-aliasing, adaptive depth control, fancy
  1199. bounding volumes, first hit speed up (?!?), spatial coherence, octrees, BSP
  1200. trees);
  1201.  
  1202. diffuse illumination and radiosity;
  1203.  
  1204. shadows, texture, and environment mapping;
  1205.  
  1206. functionally based modelling (particle systems, fractal systems, 3D texture
  1207. functions);
  1208.  
  1209. anti-aliasing (artifacts and Fourier theory, supersampling or postfiltering,
  1210. prefiltering or area sampling, stochastic sampling);
  1211.  
  1212. animation (key frame, parametric, programmed with scripting, model
  1213. driven/simulated, and temporal anti-aliasing);
  1214.  
  1215. color science (application, monitors, NTSC, models, colorimetry, the CIE
  1216. standard, realistic rendering and reflection models);
  1217.  
  1218. and appendices covering viewing transformations, wireframes, implementation of
  1219. a renderer, the Utah Teapot data set, a bit of theory, and highlight
  1220. detection.
  1221.  
  1222. [There, I didn't _quite_ type in the whole table of contents!  ;-) ]
  1223.  
  1224. Algorithms are in Pascal.  Coding tricks for speed are mentioned occasionally,
  1225. but the main emphasis is on clarity and correspondence to the theory, a
  1226. deliberate choice by the author.
  1227.  
  1228. Graphics standards (PHIGS, PHIGS+, GKS-3D) are mentioned here and there in
  1229. passing, but the model used throughout the book uses just two implementation
  1230. dependent calls:  paint pixel xy in color rgb, and inquire color rgb of pixel
  1231. xy; much too simple a graphics system to require a "standard".
  1232.  
  1233. I am too much of a newbie here to "recommend" a book I've barely opened, but
  1234. I'm sure going to enjoy this one, it covers exactly what I wanted to know and
  1235. seems to have the right level of detail, too.
  1236.  
  1237. xanthian@well.sf.ca.us  xanthian@ads.com (Kent Paul Dolan)
  1238.  
  1239. -------------------------------------------------------------------------------
  1240.  
  1241. Where To Find U.S. Map Data, by Dru Nelson
  1242.  
  1243. >From: dnelson@mthvax.cs.miami.edu (Dru Nelson)
  1244. Newsgroups: comp.graphics
  1245.  
  1246. I have searched far and wide and have come up with a couple sources for U.S.
  1247. Map data.
  1248.  
  1249. HANAUMA.STANFORD.EDU (36.51.0.16) has the world map as does the UCSD.EDU
  1250. Anonymous FTP site.  This database is the CIA World Bank II and it contains
  1251. the data and some source files explaining the format.  The World Bank II is
  1252. Public Domain.  Oh yes, I believe it also has the coordinates to some major
  1253. cities.  The data has the land boundaries, rivers, political boundaries, and
  1254. one other thing I can't remember ;-)
  1255.  
  1256. The U.S.  Map and state lines can also be purchased from Austin Code Works for
  1257. a small fee.  This is also public domain data.
  1258.  
  1259. At UCSD.edu there is also a mercator projection.
  1260.  
  1261. One last interesting database is on uunet.uu.net.  There is a large Census
  1262. file.  I didn't get it, but it might help somebody out.  I read an article in
  1263. Byte showing that the census has maps of all the roads on CD and this might be
  1264. one of their files.  It might be handy to play with if you don't have the most
  1265. recent CD of the data yet.
  1266.  
  1267. -------------------------------------------------------------------------------
  1268.  
  1269. References for Rendering Height Fields, Mark VandeWettering
  1270.  
  1271. Newsgroups: comp.graphics
  1272.  
  1273. >Could anyone recommend some good papers or books discussing the
  1274. >rendering of height fields?  A friend of mine is implementing a
  1275. >height field raytracer and any references would be extremely useful.
  1276.  
  1277. I liked the following paper when I first read it, it proved useful in 
  1278. a couple of ways.  
  1279.  
  1280. %A Sabine Coquillart
  1281. %A Michael Gangnet
  1282. %T Shaded Display of Digital Maps
  1283. %J IEEE Computer Graphics and Applications
  1284. %P 35-42
  1285. %D July, 1984
  1286. %K maps, terrain, ray tracing, priority list
  1287. %X Several methods for displaying height fields are presented.  
  1288. Bilinear interpolation of patches is used to define the surface.  Efficient
  1289. algorithms, and quite elegant.  Reminiscent of Kajiya's cut planes for
  1290. surfaces of revolution.
  1291.  
  1292. Also, Musgrave had this Yale tech report.  I ordered it from Yale Dept of
  1293. Computer Science, but don't have who to contact over there anymore.  Perhaps
  1294. someone else has the information.  Musgrave's approach was basically to make
  1295. an adaptation of 3DDA uniform subdivision algorithms for height fields.  I
  1296. believe this code is also implemented in Craig Kolb's rayshade program.
  1297.  
  1298. %A F. Kenton Musgrave
  1299. %T Grid Tracing: Fast Ray Tracing For Height Fields
  1300. %J Research Report YALEU/DCS/RR-639
  1301. %D July, 1988
  1302.  
  1303. -------------------------------------------------------------------------------
  1304.  
  1305. RayShade 3.0 Released on comp.sources.unix, by Craig Kolb
  1306.  
  1307. Submitted-by: Craig Kolb <craig@weedeater.math.yale.edu>
  1308. Posting-number: Volume 21, Issue 8
  1309. Archive-name: rayshade/part01
  1310.  
  1311. This is version 3.0 of rayshade, a raytracing program.  Rayshade reads
  1312. a multi-line ASCII file describing a scene to be rendered and produces
  1313. a Utah Raster RLE format file of the raytraced image.
  1314.  
  1315. Rayshade features:
  1316.  
  1317.     Eight types of primitives (box, cone, cylinder, height field,
  1318.     polygon, sphere, superquadric, flat- and Phong-shaded triangle)
  1319.  
  1320.     Composite objects
  1321.  
  1322.     Point, directional, and extended (area) light sources
  1323.  
  1324.     Solid procedural texturing and bump mapping of primitives, objects,
  1325.         and individual instances of objects
  1326.  
  1327.     Antialiasing through adaptive supersampling or "jittered" sampling
  1328.  
  1329.     Arbitrary linear transformations on primitives,
  1330.         instances of objects, and texture/bump maps
  1331.  
  1332.     Use of uniform spatial subdivision or hierarchy of bounding
  1333.         volumes to speed rendering
  1334.  
  1335.     Options to facilitate rendering of stereo pairs
  1336.  
  1337.     Support for the C-Linda parallel programming language
  1338.  
  1339. Rayshade has been tested on many different UNIX-based computers.  If your
  1340. machine has a C compiler and enough memory (at least 2Mb), rayshade should
  1341. be fairly easy to port.  Be warned that rayshade uses yacc and lex to
  1342. process input files.  If you do not have lex and yacc, try to get flex and
  1343. bison from the Free Software Foundation folks (ftp to prep.ai.mit.edu).
  1344.  
  1345. -------------------------------------------------------------------------------
  1346.  
  1347. Bibliography of Texture Mapping & Image Warping, by Paul Heckbert
  1348.  
  1349. >From: ph@miro.Berkeley.EDU (Paul Heckbert)
  1350. Organization: University of California at Berkeley
  1351.  
  1352. Here is a fairly complete bibliography on texture mapping and image warping.
  1353. About a year ago I posted a request for such references to comp.graphics
  1354. in order to help me with my Master's thesis, and I got a number of helpful
  1355. responses.
  1356.  
  1357. Incidentally, I finished my Master's thesis in May, and if you're interested
  1358. in the properties of simple geometric mappings such as affine, bilinear,
  1359. and projective (perspective), or the signal processing theory of resampling
  1360. involved in texture filtering and image warping, you might want
  1361. to check it out:
  1362.  
  1363.     Paul S. Heckbert
  1364.     Fundamentals of Texture Mapping and Image Warping
  1365.     Master's thesis, UCB/CSD 89/516
  1366.     CS Dept, UC Berkeley
  1367.     May 1989
  1368.     (order from CS Dept, UC Berkeley, Berkeley CA, 94720)
  1369.     [I highly recommend it--EAH]
  1370.  
  1371. The bibliography that follows includes articles on
  1372.     (computer graphics terms:)
  1373.     texture synthesis, geometric mapping, texture filtering
  1374.     (image processing terms:)
  1375.     image warping, geometric correction, distortion, image transformation,
  1376.     resampling, image interpolation and decimation, image pyramid
  1377.  
  1378. I've excluded references on rendering and signal processing in general,
  1379. and most textbooks, since they're generally derivative.
  1380. The list is in UNIX refer(1) format. %K is keywords, %Z is my comments.
  1381. Please email me any additions/corrections.
  1382.  
  1383. Since this list is so long, I'll make recommendations.
  1384. The best papers to read first are: Blinn-Newell76, Feibush-Levoy-Cook80,
  1385. Catmull-Smith80; and good surveys are Heckbert86 (IMHO), Wolberg88.
  1386.  
  1387. Paul Heckbert, Computer Science Dept.
  1388. Evans Hall, UC Berkeley            INTERNET: ph@miro.berkeley.edu
  1389. Berkeley, CA 94720            UUCP: ucbvax!miro.berkeley.edu!ph
  1390.  
  1391. ----
  1392.  
  1393. %E A. Rosenfeld
  1394. %T Multiresolution Image Processing and Analysis
  1395. %O Leesberg, VA, July 1982
  1396. %I Springer
  1397. %C Berlin
  1398. %D 1984
  1399. %K image pyramid
  1400.  
  1401. %A Narendra Ahuja
  1402. %A Bruce J. Schachter
  1403. %T Pattern Models
  1404. %I John Wiley
  1405. %C New York
  1406. %D 1983
  1407. %K tessellation, Voronoi diagram, triangulation,
  1408. point process, stochastic process, texture synthesis, height field
  1409.  
  1410. %A Masayoshi Aoki
  1411. %A Martin D. Levine
  1412. %T Computer Generation of Realistic Pictures
  1413. %J Computers and Graphics
  1414. %V 3
  1415. %P 149-161
  1416. %D 1978
  1417. %K texture mapping
  1418. %Z planar parametric mapping, no filtering
  1419.  
  1420. %A Alan H. Barr
  1421. %T Decal Projections
  1422. %B SIGGRAPH '84 Mathematics of Computer Graphics seminar notes
  1423. %D July 1984
  1424. %K texture mapping, ray tracing
  1425.  
  1426. %A Eric A. Bier
  1427. %A Kenneth R. Sloan, Jr.
  1428. %T Two-Part Texture Mappings
  1429. %J IEEE Computer Graphics and Applications
  1430. %V 6
  1431. %N 9
  1432. %D Sept. 1986
  1433. %P 40-53
  1434. %K texture mapping
  1435. %Z projection parameterizations
  1436.  
  1437. %A James F. Blinn
  1438. %A Martin E. Newell
  1439. %T Texture and Reflection in Computer Generated Images
  1440. %J CACM
  1441. %V 19
  1442. %N 10
  1443. %D Oct. 1976
  1444. %P 542-547
  1445. %Z early paper on texture mapping, discusses spherical sky textures
  1446. %K texture mapping, reflection, ray tracing
  1447.  
  1448. %A James F. Blinn
  1449. %T Computer Display of Curved Surfaces
  1450. %R PhD thesis
  1451. %I CS Dept., U. of Utah
  1452. %D 1978
  1453. %O (TR 1060-126, Jet Propulsion Lab, Pasadena)
  1454. %K texture mapping, bump mapping, shading, patch
  1455.  
  1456. %A James F. Blinn
  1457. %T Simulation of Wrinkled Surfaces
  1458. %J Computer Graphics
  1459. (SIGGRAPH '78 Proceedings)
  1460. %V 12
  1461. %N 3
  1462. %D Aug. 1978
  1463. %P 286-292
  1464. %K bump mapping
  1465.  
  1466. %A Carlo Braccini
  1467. %A Giuseppe Marino
  1468. %T Fast Geometrical Manipulations of Digital Images
  1469. %J Computer Graphics and Image Processing
  1470. %V 13
  1471. %P 127-141
  1472. %D 1980
  1473. %K image warp
  1474.  
  1475. %A Peter J. Burt
  1476. %T Fast Filter Transforms for Image Processing
  1477. %J Computer Graphics and Image Processing
  1478. %V 16
  1479. %P 20-51
  1480. %D 1981
  1481. %Z gaussian filter, image pyramid
  1482.  
  1483. %A Brian Cabral
  1484. %A Nelson Max
  1485. %A Rebecca Springmeyer
  1486. %T Bidirectional Reflection Functions from Surface Bump Maps
  1487. %J Computer Graphics
  1488. (SIGGRAPH '87 Proceedings)
  1489. %V 21
  1490. %N 4
  1491. %D July 1987
  1492. %P 273-281
  1493.  
  1494. %A Richard J. Carey
  1495. %A Donald P. Greenberg
  1496. %T Textures for Realistic Image Synthesis
  1497. %J Computers and Graphics
  1498. %V 9
  1499. %N 2
  1500. %D 1985
  1501. %P 125-138
  1502. %K texture mapping, texture synthesis
  1503.  
  1504. %A K. R. Castleman
  1505. %T Digital Image Processing
  1506. %I Prentice-Hall %C Englewood Cliffs, NJ
  1507. %D 1979
  1508. %K geometric correction
  1509.  
  1510. %A Edwin E. Catmull
  1511. %T A Subdivision Algorithm for Computer Display of Curved Surfaces
  1512. %R PhD thesis
  1513. %I Dept. of CS, U. of Utah
  1514. %D Dec. 1974
  1515. %Z bicubic patches, 1st texture mapping
  1516.  
  1517. %A Edwin E. Catmull
  1518. %A Alvy Ray Smith
  1519. %T 3-D Transformations of Images in Scanline Order
  1520. %J Computer Graphics
  1521. (SIGGRAPH '80 Proceedings)
  1522. %V 14
  1523. %N 3
  1524. %D July 1980
  1525. %P 279-285
  1526. %K texture mapping
  1527. %Z two-pass image warp
  1528.  
  1529. %A Alan L. Clark
  1530. %T Roughing It: Realistic Surface Types and Textures in Solid Modeling
  1531. %J Computers in Mechanical Engineering
  1532. %V 3
  1533. %N 5
  1534. %D Mar. 1985
  1535. %P 12-16
  1536. %K shading
  1537. %Z implementation of Cook-Torrance81
  1538.  
  1539. %A James J. Clark
  1540. %A Matthew R. Palmer
  1541. %A Peter D. Lawrence
  1542. %T A Transformation Method for the Reconstruction of Functions
  1543. from Nonuniformly Spaced Samples
  1544. %J IEEE Trans. on Acoustics, Speech, and Signal Processing
  1545. %V ASSP-33
  1546. %N 4
  1547. %D Oct. 1985
  1548. %P 1151-1165
  1549. %K signal processing, antialiasing
  1550. %Z reconstruct from nonuniform samples by warping the samples to be uniform
  1551.  
  1552. %A Robert L. Cook
  1553. %T Shade Trees
  1554. %J Computer Graphics
  1555. (SIGGRAPH '84 Proceedings)
  1556. %V 18
  1557. %N 3
  1558. %D July 1984
  1559. %P 223-231
  1560. %K shading, texture mapping
  1561.  
  1562. %A Robert L. Cook
  1563. %A Loren Carpenter
  1564. %A Edwin Catmull
  1565. %T The Reyes Image Rendering Architecture
  1566. %J Computer Graphics
  1567. (SIGGRAPH '87 Proceedings)
  1568. %V 21
  1569. %N 4
  1570. %D July 1987
  1571. %K rendering
  1572.  
  1573. %A S. Coquillart
  1574. %T Displaying Random Fields
  1575. %J Computer Graphics Forum
  1576. %V 4
  1577. %N 1
  1578. %D Jan. 1985
  1579. %P 11-19
  1580. %K texture
  1581.  
  1582. %A Ronald E. Crochiere
  1583. %A Lawrence R. Rabiner
  1584. %T Multirate Digital Signal Processing
  1585. %I Prentice Hall
  1586. %C Englewood Cliffs, NJ
  1587. %D 1983
  1588. %K resampling
  1589. %Z rational scale affine 1-D resampling
  1590.  
  1591. %A Franklin C. Crow
  1592. %T Summed-Area Tables for Texture Mapping
  1593. %J Computer Graphics
  1594. (SIGGRAPH '84 Proceedings)
  1595. %V 18
  1596. %N 3
  1597. %D July 1984
  1598. %P 207-212
  1599. %K antialiasing
  1600.  
  1601. %A William Dungan, Jr.
  1602. %A Anthony Stenger
  1603. %A George Sutty
  1604. %T Texture Tile Considerations for Raster Graphics
  1605. %J Computer Graphics
  1606. (SIGGRAPH '78 Proceedings)
  1607. %V 12
  1608. %N 3
  1609. %D Aug. 1978
  1610. %P 130-134
  1611. %K image pyramid
  1612.  
  1613. %A Karl M. Fant
  1614. %T A Nonaliasing, Real-Time Spatial Transform Technique
  1615. %J IEEE Computer Graphics and Applications
  1616. %D Jan. 1986
  1617. %P 71-80
  1618. %Z two-pass image warp, trivial
  1619.  
  1620. %A Eliot A. Feibush
  1621. %A Marc Levoy
  1622. %A Robert L. Cook
  1623. %T Synthetic Texturing Using Digital Filters
  1624. %J Computer Graphics
  1625. (SIGGRAPH '80 Proceedings)
  1626. %V 14
  1627. %N 3
  1628. %D July 1980
  1629. %P 294-301
  1630. %K texture mapping
  1631. %Z antialiasing polygon edges and textures
  1632.  
  1633. %A Eliot A. Feibush
  1634. %A Donald P. Greenberg
  1635. %T Texture Rendering Systems for Architectural Design
  1636. %J Computer-Aided Design
  1637. %V 12
  1638. %N 2
  1639. %D Mar. 1980
  1640. %P 67-71
  1641. %K texture mapping
  1642.  
  1643. %A Leonard A. Ferrari
  1644. %A Jack Sklansky
  1645. %T A Fast Recursive Algorithm for Binary-Valued Two-Dimensional Filters
  1646. %J Computer Vision, Graphics, and Image Processing
  1647. %V 26
  1648. %N 3
  1649. %D June 1984
  1650. %P 292-302
  1651. %Z summed area table generalized to rectilinear polygons
  1652.  
  1653. %A Leonard A. Ferrari
  1654. %A Jack Sklansky
  1655. %T A Note on Duhamel Integrals and Running Average Filters
  1656. %J Computer Vision, Graphics, and Image Processing
  1657. %V 29
  1658. %D Mar. 1985
  1659. %P 358-360
  1660. %Z proof of algorithm in their 1984 paper
  1661.  
  1662. %A Leonard A. Ferrari
  1663. %A P. V. Sankar
  1664. %A Jack Sklansky
  1665. %A Sidney Leeman
  1666. %T Efficient Two-Dimensional Filters Using B-Spline Functions
  1667. %J Computer Vision, Graphics, and Image Processing
  1668. %V 35
  1669. %D 1986
  1670. %P 152-169
  1671. %Z b-spline filtering by repeated integration
  1672.  
  1673. %A Eugene Fiume
  1674. %A Alain Fournier
  1675. %A V. Canale
  1676. %T Conformal Texture Mapping
  1677. %B Eurographics '87
  1678. %D 1987
  1679. %P 53-64
  1680. %K geometric mapping, parameterization
  1681.  
  1682. %A Alain Fournier
  1683. %A Eugene Fiume
  1684. %T Constant-Time Filtering with Space-Variant Kernels
  1685. %J Computer Graphics
  1686. (SIGGRAPH '88 Proceedings)
  1687. %V 22
  1688. %N 4
  1689. %D Aug. 1988
  1690. %P 229-238
  1691. %Z variant of pyramid techniques: precompute convolutions with patch fragments
  1692. note: memory required is O(1) with minor mods, not O(m^2) as they say
  1693.  
  1694. %A Donald Fraser
  1695. %A Robert A. Schowengerdt
  1696. %A Ian Briggs
  1697. %T Rectification of Multichannel Images in Mass Storage Using Image
  1698. Transposition
  1699. %J Computer Vision, Graphics, and Image Processing
  1700. %V 29
  1701. %N 1
  1702. %D Jan. 1985
  1703. %P 23-36
  1704. %Z texture mapping, two-pass image warp, just like Catmull & Smith 80!
  1705. see corrigendum vol. 31, p. 395
  1706.  
  1707. %A D. E. Friedmann
  1708. %T Operational Resampling for Correcting Images to a Geocoded Format
  1709. %B Proc. 15th Intl. Symp. Remote Sensing of Environment
  1710. %C Ann Arbor
  1711. %D 1981
  1712. %P 195-212
  1713. %Z two-pass image warp
  1714.  
  1715. %A A. Gagalowicz
  1716. %T Texture Modelling Applications
  1717. %J The Visual Computer
  1718. %V 3
  1719. %N 4
  1720. %D 1987
  1721. %P 186-200
  1722.  
  1723. %A Andre Gagalowicz
  1724. %A Song de Ma
  1725. %T Model Driven Synthesis of Natural Textures for 3-D Scenes
  1726. %B Eurographics '85
  1727. %D 1985
  1728. %P 91-108
  1729. %K texture synthesis
  1730.  
  1731. %A Michel Gangnet
  1732. %A Didier Perny
  1733. %A Philippe Coueignoux
  1734. %T Perspective Mapping of Planar Textures
  1735. %B Eurographics '82
  1736. %D 1982
  1737. %P 57-71
  1738. %K texture mapping, antialiasing
  1739. %O reprinted in Computers and Graphics, Vol 8. No 2, 1984, pp. 115-123
  1740.  
  1741. %A Michel Gangnet
  1742. %A Djamchid Ghazanfarpour
  1743. %T Techniques for Perspective Mapping of Planar Textures
  1744. %I Colloque Image de Biarritz, CESTA
  1745. %D May 1984
  1746. %P 29-35
  1747. %K texture mapping, antialiasing
  1748. %Z in french
  1749.  
  1750. %A Geoffrey Y. Gardner
  1751. %T Simulation of Natural Scenes Using Textured Quadric Surfaces
  1752. %J Computer Graphics
  1753. (SIGGRAPH '84 Proceedings)
  1754. %V 18
  1755. %N 3
  1756. %D July 1984
  1757. %P 11-20
  1758. %K tree, cloud
  1759. %Z 3-D fourier series texture function
  1760.  
  1761. %A Geoffrey Y. Gardner
  1762. %T Visual Simulation of Clouds
  1763. %J Computer Graphics
  1764. (SIGGRAPH '85 Proceedings)
  1765. %V 19
  1766. %N 3
  1767. %D July 1985
  1768. %P 297-303
  1769. %K quadric, texture
  1770.  
  1771. %A Andrew S. Glassner
  1772. %T Adaptive Precision in Texture Mapping
  1773. %J Computer Graphics
  1774. (SIGGRAPH '86 Proceedings)
  1775. %V 20
  1776. %N 4
  1777. %D Aug. 1986
  1778. %P 297-306
  1779. %Z adaptive texture filter according to local variance, uses summed area table
  1780.  
  1781. %A W. B. Green
  1782. %T Digital Image Processing - A Systems Approach
  1783. %I Van Nostrand Reinhold
  1784. %C New York
  1785. %D 1983
  1786. %K geometric correction
  1787.  
  1788. %A Ned Greene
  1789. %A Paul S. Heckbert
  1790. %T Creating Raster Omnimax Images from Multiple Perspective Views
  1791. Using The Elliptical Weighted Average Filter
  1792. %J IEEE Computer Graphics and Applications
  1793. %V 6
  1794. %N 6
  1795. %D June 1986
  1796. %P 21-27
  1797. %K texture mapping, image warp, antialiasing
  1798.  
  1799. %A Ned Greene
  1800. %T Environment Mapping and Other Applications of World Projections
  1801. %J IEEE Computer Graphics and Applications
  1802. %V 6
  1803. %N 11
  1804. %D Nov. 1986
  1805. %K reflection mapping
  1806. %Z revised from Graphics Interface '86 version
  1807.  
  1808. %A Shinichiro Haruyama
  1809. %A Brian A. Barsky
  1810. %T Using Stochastic Modeling for Texture Generation
  1811. %J IEEE Computer Graphics and Applications
  1812. %D Mar. 1984
  1813. %P 7-19
  1814. %O errata Feb. 1985, p. 87
  1815. %K texture mapping, bump mapping, texture synthesis, fractal
  1816.  
  1817. %A Paul S. Heckbert
  1818. %T Texture Mapping Polygons in Perspective
  1819. %I NYIT Computer Graphics Lab
  1820. %R TM 13
  1821. %D Apr. 1983
  1822. %K antialiasing
  1823.  
  1824. %A Paul S. Heckbert
  1825. %T Filtering by Repeated Integration
  1826. %J Computer Graphics
  1827. (SIGGRAPH '86 Proceedings)
  1828. %V 20
  1829. %N 4
  1830. %D Aug. 1986
  1831. %P 317-321
  1832. %K filter, integration, convolution
  1833. %Z generalizes Perlin's selective image filter and Crow's summed area table
  1834.  
  1835. %A Paul S. Heckbert
  1836. %T Survey of Texture Mapping
  1837. %J IEEE Computer Graphics and Applications
  1838. %V 6
  1839. %N 11
  1840. %D Nov. 1986
  1841. %P 56-67
  1842. %Z revised from Graphics Interface '86 version
  1843.  
  1844. %A Paul S. Heckbert
  1845. %T Fundamentals of Texture Mapping and Image Warping
  1846. %R Master's thesis, UCB/CSD 89/516
  1847. %I CS Dept, UC Berkeley
  1848. %D May 1989
  1849.  
  1850. %A Berthold K. P. Horn
  1851. %T Hill Shading and the Reflectance Map
  1852. %J Proc. IEEE
  1853. %V 69
  1854. %N 1
  1855. %D Jan. 1981
  1856. %P 14-47
  1857. %K shading, terrain, illumination map
  1858. %Z exhaustive survey of ad hoc and theoretical terrain shading methods
  1859.  
  1860. %A J. C. Hourcade
  1861. %A A. Nicolas
  1862. %T Inverse Perspective Mapping in Scanline Order
  1863. onto Non-Planar Quadrilaterals
  1864. %B Eurographics '83
  1865. %D 1983
  1866. %P 309-319
  1867. %K texture mapping, antialiasing
  1868.  
  1869. %A James T. Kajiya
  1870. %T Anisotropic Reflection Models
  1871. %J Computer Graphics
  1872. (SIGGRAPH '85 Proceedings)
  1873. %V 19
  1874. %N 3
  1875. %D July 1985
  1876. %P 15-21
  1877. %K texture mapping, levels of detail
  1878. %Z frame mapping
  1879.  
  1880. %A James T. Kajiya
  1881. %A Timothy L. Kay
  1882. %T Rendering Fur with Three Dimensional Textures
  1883. %J Computer Graphics
  1884. (SIGGRAPH '89 Proceedings)
  1885. %V 23
  1886. %N 3
  1887. %D July 1989
  1888. %P 271-280
  1889. %Z solid texture
  1890.  
  1891. %A A. Kaufman
  1892. %A S. Azaria
  1893. %T Texture Synthesis Techniques for Computer Graphics
  1894. %J Computers and Graphics
  1895. %V 9
  1896. %N 2
  1897. %D 1985
  1898. %P 139-145
  1899.  
  1900. %A Douglas S. Kay
  1901. %A Donald P. Greenberg
  1902. %T Transparency for Computer Synthesized Images
  1903. %J Computer Graphics
  1904. (SIGGRAPH '79 Proceedings)
  1905. %V 13
  1906. %N 2
  1907. %D Aug. 1979
  1908. %P 158-164
  1909. %Z 2.5-D ray tracing: refraction by warping background image,
  1910. contains better refraction formula than Whitted
  1911. %K ray tracing
  1912.  
  1913. %A Wolfgang Krueger
  1914. %T Intensity Fluctuations and Natural Texturing
  1915. %J Computer Graphics
  1916. (SIGGRAPH '88 Proceedings)
  1917. %V 22
  1918. %N 4
  1919. %D Aug. 1988
  1920. %P 213-220
  1921.  
  1922. %A J. P. Lewis
  1923. %T Algorithms for Solid Noise Synthesis
  1924. %J Computer Graphics
  1925. (SIGGRAPH '89 Proceedings)
  1926. %V 23
  1927. %N 3
  1928. %D July 1989
  1929. %P 263-270
  1930. %Z solid texture
  1931.  
  1932. %A Song de Ma
  1933. %A Andre Gagalowicz
  1934. %T Determination of Local Coordinate Systems for Texture Synthesis
  1935. on 3-D Surfaces
  1936. %B Eurographics '85
  1937. %D 1985
  1938. %P 109-118
  1939. %K texture synthesis
  1940.  
  1941. %A Nadia Magnenat-Thalmann
  1942. %A N. Chourot
  1943. %A Daniel Thalmann
  1944. %T Colour Gradation, Shading and Texture Using a Limited Terminal
  1945. %J Computer Graphics Forum
  1946. %C Netherlands
  1947. %V 3
  1948. %N 1
  1949. %D Mar. 1984
  1950. %P 83-90
  1951. %K dither
  1952.  
  1953. %A R. R. Martin
  1954. %T Recent Advances in Graphical Techniques
  1955. %B 1985 European Conference on Solid Modeling
  1956. %O London, 9-10 Sept 1985
  1957. %I Oyez Sci. and Tech. Services
  1958. %C London
  1959. %D 1985
  1960. %K texture mapping, ray tracing
  1961.  
  1962. %A Nelson L. Max
  1963. %T Shadows for Bump-Mapped Surfaces
  1964. %B Advanced Computer Graphics
  1965. (Proc. of CG Tokyo '86)
  1966. %E Tosiyasu Kunii
  1967. %I Springer Verlag
  1968. %C Tokyo
  1969. %D 1986
  1970. %P 145-156
  1971.  
  1972. %A Gene S. Miller
  1973. %A C. Robert Hoffman
  1974. %T Illumination and Reflection Maps:
  1975. Simulated Objects in Simulated and Real Environments
  1976. %B SIGGRAPH '84 Advanced Computer Graphics Animation seminar notes
  1977. %D July 1984
  1978. %Z reflection maps: how to make and use them
  1979. %K ray tracing, illumination map
  1980.  
  1981. %A Alan Norton
  1982. %A Alyn P. Rockwood
  1983. %A Philip T. Skolmoski
  1984. %T Clamping: A Method of Antialiasing Textured Surfaces by
  1985. Bandwidth Limiting in Object Space
  1986. %J Computer Graphics
  1987. (SIGGRAPH '82 Proceedings)
  1988. %V 16
  1989. %N 3
  1990. %D July 1982
  1991. %P 1-8
  1992. %K texture mapping
  1993.  
  1994. %A D. A. O'Handley
  1995. %A W. B. Green
  1996. %T Recent Developments in Digital Image Processing at the
  1997. Image Processing Laboratory of the Jet Propulsion Laboratory
  1998. %J Proc. IEEE
  1999. %V 60
  2000. %N 7
  2001. %P 821-828
  2002. %D 1972
  2003. %K geometric correction
  2004.  
  2005. %A Alan W. Paeth
  2006. %T A Fast Algorithm for General Raster Rotation
  2007. %B Graphics Interface '86
  2008. %D May 1986
  2009. %K image warp, texture mapping, two-pass, three-pass
  2010. %P 77-81
  2011.  
  2012. %A Darwyn R. Peachey
  2013. %T Solid Texturing of Complex Surfaces
  2014. %J Computer Graphics
  2015. (SIGGRAPH '85 Proceedings)
  2016. %V 19
  2017. %N 3
  2018. %D July 1985
  2019. %P 279-286
  2020. %K 3-D texture
  2021.  
  2022. %A Ken Perlin
  2023. %T A Unified Texture/Reflectance Model
  2024. %B SIGGRAPH '84 Advanced Image Synthesis seminar notes
  2025. %D July 1984
  2026. %K texture mapping, bump mapping
  2027. %Z making microfacet distribution functions consistent
  2028. with normal perturbations; hash function
  2029.  
  2030. %A Ken Perlin
  2031. %T Course Notes
  2032. %B SIGGRAPH '85 State of the Art in Image Synthesis seminar notes
  2033. %D July 1985
  2034. %K antialiasing, filter, blur
  2035. %Z generalizing Crow's summed-area tables to higher order filter kernels
  2036.  
  2037. %A Ken Perlin
  2038. %T An Image Synthesizer
  2039. %J Computer Graphics
  2040. (SIGGRAPH '85 Proceedings)
  2041. %V 19
  2042. %N 3
  2043. %D July 1985
  2044. %P 287-296
  2045. %Z texture functions, pixel stream editor
  2046.  
  2047. %A Ken Perlin
  2048. %A Eric M. Hoffert
  2049. %T Hypertexture
  2050. %J Computer Graphics
  2051. (SIGGRAPH '89 Proceedings)
  2052. %V 23
  2053. %N 3
  2054. %D July 1989
  2055. %P 253-262
  2056. %Z using solid texture as an implicit function to define density & surfaces
  2057.  
  2058. %A H. J. Reitsema
  2059. %A A. J. Word
  2060. %A E. Ramberg
  2061. %T High-fidelity image resampling for remote sensing
  2062. %J Proc. of SPIE
  2063. %V 432
  2064. %D 1984
  2065. %P 211-215
  2066.  
  2067. %A Marcel Samek
  2068. %A Cheryl Slean
  2069. %A Hank Weghorst
  2070. %T Texture Mapping and Distortion in Digital Graphics
  2071. %J Visual Computer
  2072. %V 2
  2073. %N 5
  2074. %D 1986
  2075. %P 313-320
  2076.  
  2077. %A Michael Shantz
  2078. %T Two Pass Warp Algorithm for Hardware Implementation
  2079. %J Proc. SPIE, Processing and Display of Three Dimensional Data
  2080. %V 367
  2081. %D 1982
  2082. %P 160-164
  2083. %K two-pass image warp
  2084.  
  2085. %A S. Shlien
  2086. %T Geometric Correction, Registration and Resampling of Landsat Imagery
  2087. %J Canad. J. Remote Sensing
  2088. %V 5
  2089. %D 1979
  2090. %P 74-89
  2091.  
  2092. %A Alvy Ray Smith
  2093. %T Planar 2-Pass Texture Mapping and Warping
  2094. %J Computer Graphics
  2095. (SIGGRAPH '87 Proceedings)
  2096. %V 21
  2097. %N 4
  2098. %D July 1987
  2099. %P 263-272
  2100.  
  2101. %A Alvy Ray Smith
  2102. %T TEXAS (Preliminary Report)
  2103. %I NYIT Computer Graphics Lab
  2104. %R TM 10
  2105. %D July 1979
  2106. %K texture mapping
  2107.  
  2108. %A Alvy Ray Smith
  2109. %T Incremental Rendering of Textures in Perspective
  2110. %B SIGGRAPH '80 Animation Graphics seminar notes
  2111. %D July 1980
  2112. %K texture mapping
  2113.  
  2114. %A A. Tanaka
  2115. %A M. Kameyama
  2116. %A S. Kazama
  2117. %A O. Watanabe
  2118. %T A Rotation Method for Raster Image Using Skew Transformation
  2119. %B Proc IEEE Conf on Computer Vision and Pattern Recognition
  2120. %D June 1986
  2121. %P 272-277
  2122. %K texture mapping, image warp
  2123.  
  2124. %A S. L. Tanimoto
  2125. %A Theo Pavlidis
  2126. %T A Hierarchical Data Structure for Picture Processing
  2127. %J Computer Graphics and Image Processing
  2128. %V 4
  2129. %N 2
  2130. %D June 1975
  2131. %P 104-119
  2132. %K image pyramid
  2133.  
  2134. %A D. Thalmann
  2135. %T A Lifegame Approach to Surface Modelling and Texturing
  2136. %J The Visual Computer
  2137. %V 2
  2138. %N 6
  2139. %D 1986
  2140. %P 384-390
  2141.  
  2142. %A Nuio Tsuchida
  2143. %A Yoji Yamada
  2144. %A Minoru Ueda
  2145. %T Hardware for Image Rotation by Twice Skew Transformations
  2146. %J IEEE Trans on Acoustics, Speech, and Signal Processing
  2147. %V ASSP-35
  2148. %N 4
  2149. %D Apr. 1987
  2150. %P 527-532
  2151. %K image warp
  2152.  
  2153. %A Ken Turkowski
  2154. %T The Differential Geometry of Texture Mapping
  2155. %R Technical Report No. 10
  2156. %I Apple Computer
  2157. %C Cupertino, CA
  2158. %D May 1988
  2159. %K mapping, filter
  2160.  
  2161. %A Douglass Allen Turner
  2162. %T A Taxonomy of Texturing Techniques
  2163. %R Master's thesis
  2164. %I Dept. of Computer Science, U of North Carolina, Chapel Hill
  2165. %D 1988
  2166.  
  2167. %A Carl F. R. Weiman
  2168. %T Continuous Anti-Aliased Rotation and Zoom of Raster Images
  2169. %J Computer Graphics
  2170. (SIGGRAPH '80 Proceedings)
  2171. %V 14
  2172. %N 3
  2173. %D July 1980
  2174. %P 286-293
  2175. %K image warp, line drawing, digital line, texture mapping
  2176.  
  2177. %A Lance Williams
  2178. %T Pyramidal Parametrics
  2179. %J Computer Graphics
  2180. (SIGGRAPH '83 Proceedings)
  2181. %V 17
  2182. %N 3
  2183. %D July 1983
  2184. %P 1-11
  2185. %K texture mapping, antialiasing
  2186.  
  2187. %A George Wolberg
  2188. %T Geometric Transformation Techniques for Digital Images: A Survey
  2189. %R TR CUCS-390-88
  2190. %I Dept. of CS, Columbia U.
  2191. %D Dec. 1988
  2192.  
  2193. %A George Wolberg
  2194. %T Skeleton-Based Image Warping
  2195. %J Visual Computer
  2196. %V 5
  2197. %D 1989
  2198. %P 95-108
  2199.  
  2200. %A George Wolberg
  2201. %A Terrance E. Boult
  2202. %T Separable Image Warping with Spatial Lookup Tables
  2203. %J Computer Graphics
  2204. (SIGGRAPH '89 Proceedings)
  2205. %V 23
  2206. %N 3
  2207. %D July 1989
  2208. %P 369-377
  2209.  
  2210. %A Geoff Wyvill
  2211. %A Brian Wyvill
  2212. %A Craig McPheeters
  2213. %T Solid Texturing of Soft Objects
  2214. %B CG International '87
  2215. %C Tokyo
  2216. %D May 1987
  2217.  
  2218. %A John F. S. Yau
  2219. %A Neil D. Duffy
  2220. %T A Texture Mapping Approach to 3-D Facial Image Synthesis
  2221. %J Computer Graphics Forum
  2222. %V 7
  2223. %N 2
  2224. %D June 1988
  2225. %P 129-134
  2226. %Z face
  2227.  
  2228. -------------------------------------------------------------------------------
  2229.  
  2230. More Texturing Functions, by Jon Buller
  2231.  
  2232. >From: jonb@vector.Dallas.TX.US (Jon Buller)
  2233. Organization: Dallas Semiconductor
  2234.  
  2235. Last April, when there were many raging requests for the RenderMan Noise
  2236. function.  I posted the one that I got from Gary Herron (one of my Profs at
  2237. the time).  After I had fixed the hashing it used, so that there would not be
  2238. rows upon rows of blobs of the same shape, I posted it to comp.graphics.  I
  2239. didn't have it documented in the best form, since I posted it quickly to
  2240. hopefully stem the tide of requests.  There was a bug in it (that I knew
  2241. about, but forgot to tell everyone about, and it needed several followups to
  2242. explain how it worked and how to initialize it, etc.)
  2243.  
  2244. Well, I would like to get some various texture routines from the net at large,
  2245. just to see what others are doing, and for a bit of fun...  Of course, I don't
  2246. just want take things without some sort of return, so to get your collections
  2247. of 'new & unusual(tm)' textures started, I have included one of my favorites,
  2248. The Planet Texture.  It does not need watering, food, or specular reflection,
  2249. just take a dot-product of the surface normal and the light source direction
  2250. to add shadows, and have fun...  It is written in Pascal.  (No, I do not yet
  2251. have a C compiler for my Mac, but that WILL change in a couple of months.)  So
  2252. you must translate it to your language of choice, but I believe it is a bit
  2253. better documented than the first.
  2254.  
  2255. Anyway, I would like to see your favorite textures (call or write today!)  and
  2256. if there is a tremendous response, I may (or may not) compile them into a
  2257. list, summarize, and post.  Two textures I would REALLY like to see are 1) a
  2258. good Marble texture (like the one in [Perlin85], (guess what this paper is.),
  2259. and 2) something like the Wood_Burl texture I saw applied to your favorite
  2260. teapot and mine in a book by (or maybe edited by) Andrew Glassner.  I don't
  2261. remember the title (Computer Graphics for Artists, maybe?)
  2262.  
  2263. If you don't have a Noise function of your own, mine was translated and should
  2264. be around...  or you can link it to whatever function you like if it returns a
  2265. Real (er.. float) 8-).
  2266.  
  2267. Get Noise From UUNET (Is it still there?  I can't find out anymore.) or a
  2268. friend.  Change it to initialize the random array pts[] to fill with (-1.0 to
  2269. 1.0) instead of (0.0 to 1.0) like it says.  My Thanks to Bill Dirks for doing
  2270. that translation, BTW.  (You may also notice that I am no longer a student at
  2271. Colorado State University...)
  2272.  
  2273. I included my Turb function with this, because last time I checked UUNET
  2274. (April '89) the noise file there said that Bill had not translated the Turb
  2275. function yet, and in the interest of completeness (and reducing mail volume
  2276. 8-), it is here, but you must translate it yourself...
  2277.  
  2278. [Perlin85] An Image Synthesizer, Ken Perlin,
  2279.      Proceedings of SIGGRAPH '85
  2280.  
  2281. If you haven't guessed (after reading the code, of course 8-):
  2282. Add([x1,y1,z1], [x2,y2,z2]) = [x1+x2, y1+y2, z1+z2]
  2283. Subtract([x1,y1,z1], [x2,y2,z2]) = [x1-x2, y1-y2, z1-z2]
  2284. Scale(s, [x,y,z]) = [s*x, s*y, s*z]
  2285. Color and Vector coerce the given type of a 3-vector into the
  2286.       other kind of 3-vector
  2287.  
  2288. (* ------- cut here ------- Planet&Turb.p ------- cur here ------- *)
  2289.  
  2290. function Turb (Size: Integer; ScaleFactor: Real; Loc: Vector): Real;
  2291. (* Size = Size of largest feature: Smallest feature size = 1,
  2292.    ScaleFactor is related to the fractal dimension of the turbulence,
  2293.    Loc = point of turbulence to compute *)
  2294. var CurScale, Result: Real;
  2295.     Cur: Integer;
  2296. begin
  2297.    Result := Noise(Loc);
  2298.    CurScale := 1.0;
  2299.  
  2300.    Cur := 1;
  2301.    while Cur < Size do Begin
  2302.       Cur := BSL(Cur, 1);
  2303.            (* Shift Left is MUCH quicker than a multiply *)
  2304.       CurScale := CurScale * ScaleFactor;
  2305.       Loc := Scale(2.0, Loc);
  2306.       Result := Result + Noise(Loc) * CurScale;
  2307.    end;
  2308.    Turb := Result;
  2309. end;
  2310.  
  2311. (* This was designed to work with a unit sphere.  I think it works well, you
  2312.    may (should) form your own opinions... *)
  2313. Function Planet (Loc: Vector): Color;
  2314. Const Land  := [0.28125, 0.1875, 0.09375];
  2315.                (* A reasonably nice brown color *)
  2316.       Sea   := [0.0    , 0.0   , 1.0];
  2317.                (* Oceans are usually blue *)
  2318.       Cloud := [1.0    , 1.0   , 1.0];
  2319.                (* And Clouds are white *)
  2320.       (* OK, this part isn't Pascal, (I wish it was though...)
  2321.          but it beats the way it's done in the real code... *)
  2322. Var C: Color;
  2323.     Amt: Real;
  2324. Begin
  2325.    If Turb(430, 0.7, Loc) > 0.25
  2326.         (* The sphere I use is 430 pixels across *)
  2327.    Then C := Land
  2328.    Else C := Sea;
  2329.  
  2330.    Amt := Turb(18, 0.6, Scale(24.0, Loc));
  2331.            (* Clouds I like are 18 pixels across *)
  2332.    If Amt > -0.25 Then
  2333.    C := Color(Add(Vector(C), Scale(Amt + 0.25,
  2334.           Subtract(Vector(Cloud), Vector(C)))));
  2335.    
  2336.    (* I Wish I could do it like this...
  2337.           C := C + (Amt + 0.25) * (Cloud - C)    *)
  2338. End;
  2339.  
  2340. -- 
  2341. Jon Buller       jonb@vector.dallas.tx.us       ..!texbell!vector!jonb
  2342.  
  2343. -------------------------------------------------------------------------------
  2344.  
  2345. Ray/Cylinder Intersection, by Mark VandeWettering
  2346.  
  2347. >From: markv@gauss.Princeton.EDU (Mark VandeWettering)
  2348. Newsgroups: comp.graphics
  2349. Organization: Princeton University
  2350.  
  2351. >I am trying to do ray tracing of light through a 
  2352. >cylinder coming at different angle to the axis
  2353. >of the cylinder.  Could some one give me some
  2354. >pointers?
  2355.  
  2356. Ray cylinder intersection is (conceptually) just as easy as hitting a sphere.
  2357. Most of the problems come from clipping the cylinder so it isn't infinite.  I
  2358. can think of several ways to do this, but first let me mention that you should
  2359. consult Introduction to Ray Tracing edited by Andrew Glassner.  Articles by
  2360. Pat Hanrahan and Eric Haines go over most of this stuff.
  2361.  
  2362. It's easiest to imagine a unit cylinder formed by rotating the line x = 1 
  2363. in the xy plane about the y axis.  The formula for this cylinder is 
  2364. x^2 + z^2 = 1.  If your ray is of the form P + t D, with P and D three
  2365. tuples, you can insert the components into the original formula and 
  2366. come up with:
  2367.  
  2368.     (px + t dx)^2 + (pz + t dz)^2 - 1 = 0 
  2369.  
  2370. or    px^2 + 2 t dx px + (t dx)^2 + pz^2 + 2 t dz pz + (t dz)^2
  2371.  
  2372. or    (px^2 + pz^2) + 2 t (dx px + dz pz) + t^2 (dx^2 + dz^2)
  2373.  
  2374. which you can then solve using the quadratic formula.  If there are no roots,
  2375. then there is no intersection.  If there are roots, then these give two t
  2376. values along the ray.  Figure out those points using P + t D.  Now, clipping.
  2377. We wanted to have a finite cylinder, say within the cube two units on a side
  2378. centered at the origin.  Well, gosh, ignore any intersections that occur
  2379. outside this box.  Then take the closest one.
  2380.  
  2381. Now, to intersect with an arbitrary cylinder, work up a world transformation
  2382. matrix that transforms points into the objects coordinate system.  Transform
  2383. the ray origin and direction, and voila.  You do need to be careful to rescale
  2384. it appropriately, but its really not all that hard.
  2385.  
  2386. You might instead want to implement general quadrics as a primitive, or choose
  2387. any one of a number of different ways of doing the above.  Homogeneous
  2388. coordinates might make this simpler actually....  Hmmm....  And there is a
  2389. geometric argument that can also be used to derive algorithms like this.
  2390.  
  2391. Think about it.  It shouldn't be that difficult.
  2392.  
  2393. -------------------------------------------------------------------------------
  2394.  
  2395. C Code for Intersecting Quadrics, by Prem Subrahmanyam
  2396.  
  2397. >From: prem@geomag.fsu.edu (Prem Subrahmanyam)
  2398. Newsgroups: comp.graphics
  2399. Organization: Florida State University Computing Center
  2400.  
  2401. Here is the code I wrote in C for doing 3-dimensional quadratics.  The
  2402. derivations are rather complex, so I tried to comment the code as best I
  2403. could, but that's all I could do.  I hope people find this interesting.
  2404.  
  2405. --
  2406.  
  2407. #define TINY (float)1e-3
  2408.  
  2409. int hitconic(offset,eye,v,p,t,a,b,c,d,e,f,g,start,stop)
  2410.  
  2411. /* offset is the triple representing where the conic is to be moved */
  2412. /* from 0,0,0. */
  2413. /* eye and v represent the ray, with eye being the start point and v */
  2414. /* being the direction vector */
  2415. /* p is the point into which the intersection point value will be */
  2416. /* copied */
  2417. /* t is the value into which the line parameter will be copied for the */
  2418. /* ray. */
  2419. /* a,b,c,d,e,f,g are values for the 3-dimensional quadratic equation */
  2420. /* a*x^2 + b*y^2 + c*z^2 + d*x + e*y + f*z = g */
  2421. /* start and stop represent the bounds (when the equation is centered 
  2422.    at 0,0,0) in which to test the conic */
  2423.    /* example: if the bound around a conic were set at -1,-1,-1 to 1,1,1
  2424.       and the offset was 4,5,6 then the actual spatial extent of the
  2425.       object would be from 3,4,5 to 5,6,7 . */
  2426. /* So, the conic (3-d quadratic) should contain within its own data
  2427.    structure the offset, extent values (start,stop), and a,b,c,d,e,f,g
  2428.    constants */
  2429.  
  2430. vector offset,
  2431.        eye,
  2432.        v,
  2433.        p;
  2434.        
  2435. float     *t,
  2436.            a,
  2437.            b,
  2438.        c,
  2439.        d,
  2440.        e,
  2441.        f,
  2442.        g;
  2443.        
  2444. vector start,
  2445.        stop; 
  2446.  
  2447.     { 
  2448.     /*************************************************/
  2449.     /* this code is a little messy, but it does work */
  2450.     /*************************************************/
  2451.  
  2452.       /* create some local points to use in testing */
  2453.       vector m,p2;  
  2454.       float radical,Ay,Be,Ce,t1,t2; /* constants for quadratic formula */
  2455.       /* generated for solving for the intersection of the equations for
  2456.      the line and the equation for the quadratic */
  2457.       /* subtract offset from the ray start position to align ray and
  2458.      quadratic*/
  2459.       m[0] = eye[0] - offset[0];
  2460.       m[1] = eye[1] - offset[1];
  2461.       m[2] = eye[2] - offset[2];
  2462.  
  2463.       /* Now, using the constant values, create values for the intersection
  2464.      test formula */ 
  2465.       Ay = (a*v[0]*v[0]) + (b*v[1]*v[1]) + (c*v[2]*v[2]);
  2466.       Be = (2*a*m[0]*v[0]) + (2*b*m[1]*v[1]) + (2*c*m[2]*v[2]) +
  2467.         (d*v[0]) + (e*v[1]) + (f*v[2]);
  2468.       Ce = (a*m[0]*m[0]) + (b*m[1]*m[1]) + (c*m[2]*m[2]) +
  2469.         (d*m[0]) + (e*m[1]) + (f*m[2]) - g;
  2470.       radical = ((Be*Be) - (4*Ay*Ce));
  2471.       if (radical < 0.0) {
  2472.          return FALSE;
  2473.       }
  2474.       t1 = ((-1*Be) + sqrt(radical))/(2*Ay);
  2475.       t2 = ((-1*Be) - sqrt(radical))/(2*Ay);
  2476.  
  2477.    /* immediately eliminate cases in which return is false */
  2478.       if (((t1 < 0)&&(t2 < 0))||
  2479.       ((t1 < 0)&&(fabs(t2) < TINY))||
  2480.       ((t2 < 0)&&(fabs(t1) < TINY))||
  2481.       ((fabs(t1) < TINY)&&(fabs(t2) < TINY)))
  2482.       {
  2483.      return FALSE;
  2484.       }else{
  2485.      /* t1 a bad parameter, but t2 may not be */
  2486.      if ((t1 < 0)||(fabs(t1) < TINY)) {
  2487.        if (!(fabs(t2) < TINY)) /* prevent spurious self-shadowing */ 
  2488.        {
  2489.          /* using the parameter, find the point of intersection */
  2490.          p[0] = m[0] + v[0]*t2;
  2491.          p[1] = m[1] + v[1]*t2;
  2492.          p[2] = m[2] + v[2]*t2;
  2493.          /* test to see if the point is within the bounds for the
  2494.          quadratic section */
  2495.          if ((start[0] <= p[0])&&
  2496.          (stop[0] >= p[0])&&
  2497.          (start[1] <= p[1])&&
  2498.          (stop[1] >= p[1])&&
  2499.          (start[2] <= p[2])&&
  2500.          (stop[2] >= p[2]))
  2501.          {
  2502.            /* if it lies within the bounds, add offset back on and return
  2503.           point */
  2504.         p[0] = p[0] + offset[0];
  2505.         p[1] = p[1] + offset[1];
  2506.         p[2] = p[2] + offset[2];
  2507.         *t = t2;
  2508.         return TRUE;
  2509.          } else { /* point does not lie within the bounds */
  2510.         return FALSE;
  2511.          }
  2512.        }else{ /* t2 a bad parameter as well */
  2513.          return FALSE;
  2514.        }
  2515.      }
  2516.          
  2517.      if ((t2 < 0)||(fabs(t2) < TINY)) {
  2518.      /* t2 a false parameter, so test to see if t1 is good */
  2519.            if(!(fabs(t1) < TINY))
  2520.        { /* find point by parameter */
  2521.          p[0] = m[0] + v[0]*t1;
  2522.          p[1] = m[1] + v[1]*t1;
  2523.          p[2] = m[2] + v[2]*t1;
  2524.          if ((start[0] <= p[0])&&
  2525.          (stop[0] >= p[0])&&
  2526.          (start[1] <= p[1])&&
  2527.          (stop[1] >= p[1])&&
  2528.          (start[2] <= p[2])&&
  2529.          (stop[2] >=p[2]))
  2530.          { /* same as above, see if point lies within bounds */
  2531.         p[0] = p[0] + offset[0];
  2532.         p[1] = p[1] + offset[1];
  2533.         p[2] = p[2] + offset[2];
  2534.         *t = t1;
  2535.         return TRUE;
  2536.          } else {
  2537.         return FALSE;
  2538.          }
  2539.        }else{
  2540.         return FALSE;
  2541.        }
  2542.      }
  2543.      /* if the program has gotten here, t1 and t2 are greater than 0 */
  2544.          /* and greater than TINY */
  2545.          p[0] = m[0] + v[0]*t1;
  2546.      p[1] = m[1] + v[1]*t1;
  2547.      p[2] = m[2] + v[2]*t1;
  2548.      
  2549.      p2[0] = m[0] + v[0]*t2;
  2550.      p2[1] = m[1] + v[1]*t2;
  2551.      p2[2] = m[2] + v[2]*t2;
  2552.  
  2553.      /* see if the first point is within bounds */
  2554.      if ((start[0] <= p[0])&&
  2555.          (stop[0] >= p[0])&&
  2556.          (start[1] <= p[1])&&
  2557.          (stop[1] >= p[1])&&
  2558.          (start[2] <= p[2])&&
  2559.          (stop[2] >=p[2]))
  2560.          { /* now, see if second point is as well */
  2561.          if ((start[0] <= p2[0])&&
  2562.              (stop[0] >= p2[0])&&
  2563.          (start[1] <= p2[1])&&
  2564.          (stop[1] >= p2[1])&&
  2565.          (start[2] <= p2[2])&&
  2566.          (stop[2] >=p2[2]))
  2567.              {  /* both points are within bbox */
  2568.         if (t1 <= t2) /*see which one is smaller */
  2569.         { /* t1 yields a closer point */
  2570.             *t = t1;
  2571.             p[0] = p[0] + offset[0];
  2572.             p[1] = p[1] + offset[1];
  2573.             p[2] = p[2] + offset[2];
  2574.             return TRUE;
  2575.         } else {
  2576.          /* t2 yields a closer point */
  2577.             *t = t2;
  2578.             p[0] = p2[0] + offset[0];
  2579.             p[1] = p2[1] + offset[1];
  2580.             p[2] = p2[2] + offset[2];
  2581.                     return TRUE;
  2582.         }
  2583.          } else { /* second point not within box */
  2584.         *t = t1;
  2585.         p[0] = p[0] + offset[0];
  2586.         p[1] = p[1] + offset[1];
  2587.         p[2] = p[2] + offset[2];
  2588.         return TRUE;
  2589.          }
  2590.      } else { /* t1 not within bbox */
  2591.         if ((start[0] <= p2[0])&&
  2592.         (stop[0] >= p2[0])&&
  2593.         (start[1] <= p2[1])&&
  2594.         (stop[1] >= p2[1])&&
  2595.         (start[2] <= p2[2])&&
  2596.         (stop[2] >=p2[2]))
  2597.         { /* see if t2 is within bbox */
  2598.         *t = t2;
  2599.         p[0] = p2[0] + offset[0];
  2600.         p[1] = p2[1] + offset[1];
  2601.         p[2] = p2[2] + offset[2];
  2602.         return TRUE;
  2603.         } else { /* neither is within bounding box */
  2604.         return FALSE;
  2605.         }
  2606.     }
  2607.       }   
  2608.  }
  2609.  
  2610.  
  2611. /* HERE IS THE PORTION OF THE CODE THAT RETURNS THE NORMAL TO THE 
  2612.    QUADRATIC */ 
  2613. void findnormal(np,p,n) 
  2614.    node       *np;
  2615.    vector       p,
  2616.        n;
  2617. /* np is the pointer to the object node, p is the point of intersection,
  2618.    and n is the normal vector returned */
  2619.   {
  2620.     vector point;
  2621.     switch (np->kind) {
  2622.        /* conic section a la Prem */
  2623.        case CONIC    : point[0] = p[0] - cptr(np)->offset[0];
  2624.                        point[1] = p[1] - cptr(np)->offset[1];
  2625.                point[2] = p[2] - cptr(np)->offset[2];
  2626.                n[0] = 2.0*cptr(np)->a*point[0] + cptr(np)->d;
  2627.                n[1] = 2.0*cptr(np)->b*point[1] + cptr(np)->e;
  2628.                n[2] = 2.0*cptr(np)->c*point[2] + cptr(np)->f;
  2629.                        normalize(n);
  2630.                break;
  2631.        }
  2632.  
  2633. -------------------------------------------------------------------------------
  2634.  
  2635. Parallel Ray Tracing on IRISs, collected by Doug Turner
  2636.  
  2637. >From: Douglass Turner <cornell!apple.com!turner@eye>
  2638.  
  2639.  
  2640. Here is the collection of responses that I got from various people
  2641. kind enough to respond to my query about doing parallel ray tracing
  2642. on the IRIS. 
  2643.  
  2644. --------
  2645.  
  2646. This is from George Drettakis:
  2647.  
  2648. I'm just finishing my MSc here, and I designed and implemented a hierarchical
  2649. scheme that uses several IRIS connected over an ethernet.  The rendering
  2650. algorithm is a global illumination approach developed locally that goes one
  2651. step further than radiosity and ray-tracing combined.  The approach is based
  2652. on space-subdivision that splits the original 3-d scene into cubes adaptively
  2653. depending on the difficulty in each volume.  I assign a group of sub-volumes
  2654. to each iris, and then do the processing for the volume on each IRIS in
  2655. parallel.  This actually includes a bit of ray-casting that we do for various
  2656. purposes in our algorithm.  I use the taskcreate/taskdestroy calls to
  2657. implement this, and I use the usnewsema and usnewlock call for locking and
  2658. synchronization.  The man pages are pretty straightforward, but if you have
  2659. trouble I can put together a sample program and send it to you.  I found using
  2660. the m_get_myid function from the "sequent compatibility library" was also
  2661. useful, as it gives you a unique 1 to n-1 proc id, for n procs.  For
  2662. ray-tracing, all you need to do is to split the screen, and give each pixel to
  2663. a processor, and you're done.  The key is to avoid using any global variables,
  2664. and speaking from painful experience, other peoples code is full of it, no pun
  2665. intended, as they didn't have parallelism in mind.
  2666.  
  2667. George Drettakis (416) 978 5473        Dynamic Graphics Project    
  2668. Internet: dret@dgp.toronto.edu         Computer Systems Research Institute
  2669. Bitnet:      dret@dgp.utoronto            Toronto, Ontario M5S 1A4, CANADA
  2670.  
  2671. --------
  2672.  
  2673. This is from Steve Lamont:
  2674.  
  2675. I use brute force, forking off multiple processes.  This is probably not
  2676. optimum, but is guaranteed to work on a number of platforms, including a Cray
  2677. Y-MP running UNICOS (no shared memory between processes )-: ), a Stardent
  2678. Titan, a Convex C-220, and a SGI 4D/280GTX.  If you're interested, I'll be
  2679. glad to send you the code -- it is based on the MTV ray tracer, with
  2680. extensions.
  2681.  
  2682. Steve Lamont, sciViGuy    (919) 248-1120        EMail:    spl@ncsc.org
  2683. NCSC, Box 12732, Research Triangle Park, NC 27709
  2684.  
  2685. --------
  2686.  
  2687. This contribution is from Gavin [Bell--EAH] at SGI (not Gavin Miller!).
  2688.  
  2689. In it he mentions a demo tape that IRIS users can purchase ($100.00) that
  2690. contains source code for numerous demos including the "flyray" demo he
  2691. discusses.  I haven't gotten my copy yet but intend to soon.  The demos and
  2692. source code for other interesting looking stuff is listed in a pamphlet you
  2693. can get from IRIS (its free) called "IRIS software exchange".  I recommend it.
  2694.  
  2695. Have you seen the 'flyray' interactive ray-tracer demo running on a GTX?  It
  2696. used to be a two-processor ray-tracer (one processor computing ray/scene
  2697. intersections, the other feeding the graphics pipe) until I fully parallelized
  2698. it.  It will now use one processor to do send scene data (showing the
  2699. ray-trace going on) to the geometry subsystem, and the other N-1 to compute
  2700. the ray/scene intersections (if running over the Ethernet using the
  2701. Distributed Graphics Library all processors compute the ray/scene
  2702. intersections, with an extra process called on every once in a while to send
  2703. the results down wire).  [Excellent demo, by the way - see it. --EAH]
  2704.  
  2705. I used the sproc() system call to fork off processes, and set up a queue which
  2706. the main program (responsible for displaying the bitmap produced and showing
  2707. the rays being traced) reads from and all the child processes write into.
  2708. This queue is protected using the hardware lock feature of GTX systems (see
  2709. the usinit, usnewlock, ussetlock, and usunsetlock manual pages).
  2710.  
  2711. Rays are traced in blocks of up to 256 at a time (16x16 chunks), which cuts
  2712. down on the overhead associated with accessing the queue.  The program runs
  2713. amazingly fast on a 8-processor system, but could benefit from tracing even
  2714. larger chunks.
  2715.  
  2716. Source code to the flyray program is available from Silicon Graphics; Monica
  2717. Schulze is the person to contact (she handles distribution of demo source
  2718. code).  Try calling her at 415-962-3320.
  2719.  
  2720.     For your application, you probably don't need to do any inter-process
  2721. synchronization; each process will be busy computing its quarter of the image
  2722. and storing it in memory.  You might want to look at the m_fork() manual page;
  2723. your application will look something like:
  2724.  
  2725.     initialize_stuff (create the voxel space, etc);
  2726.     m_fork(child_process);
  2727.     m_kill_procs();
  2728.     save_image (or whatever you want to do with it)
  2729.     exit()
  2730.  
  2731.     ... and each child_process does:
  2732.     int mynum = m_get_myid();
  2733.     int np = m_get_numprocs();
  2734.     ... based on mynum and numprocs, do part of the screen here...
  2735.     return
  2736.  
  2737. The m_fork commands are nice because you get automatic synchronization (the
  2738. m_fork command returns after all child processes are finished), and it figures
  2739. out how many processors the system has for you.
  2740.  
  2741. Re: Distributed Graphics library:
  2742.  
  2743.     Yes, it is very easy to use; instead of linking with -lgl_s, you link
  2744. with -ldgl (and possibly some other libraries, depending on your networking
  2745. situation; usually, you need to add -lsun -lbsd also).  After doing a little
  2746. setup (you have to tell inetd to listen for DGL requests on a particular port
  2747. number and start up the DGL daemon), you put your program on the machine that
  2748. will execute it, and rlogin in to that machine from the SGI machine on which
  2749. you want the graphics to appear.  Then run the program.  All the graphics get
  2750. sent over the network and appear on the machine you are sitting at.
  2751.  
  2752.     However, ethernet speeds are fairly slow, so if you so a lot of drawing
  2753. you can easily overwhelm the ethernet bandwidth and slow down.  The best way
  2754. around this is to use the GL display-list commands; the object will be stored
  2755. on the display machine, and only one call needs to be sent over the network to
  2756. get it displayed.  Of course, as networks get faster this will become
  2757. unnecessary.
  2758.  
  2759. Feel free to redistribute any of this information.
  2760.  
  2761. --gavin
  2762. gavin%krypton@sgi.com
  2763.  
  2764. --------
  2765.  
  2766. This is source code from Michael John Muuss. I haven't looked at
  2767. it closely. His email path is mike@brl.mil
  2768.  
  2769. /*
  2770.  *            M A C H I N E . C
  2771.  *
  2772.  *  Machine-specific routines for doing raytracing.
  2773.  *  Includes parallel and vector support, replacement library routines, etc.
  2774.  *
  2775.  *  Author -
  2776.  *    Michael John Muuss
  2777.  
  2778.  ...
  2779.  
  2780. [for brevity (this issue is already a monster), I've deleted this code - 
  2781. look on the net, or contact Doug Turner or Michael Muuss if you are seriously
  2782. interested.]
  2783.  
  2784. --------
  2785.  
  2786. Heres a plug from Frank Phillips for SGI's course on writing parallel
  2787. applications.
  2788.  
  2789. just for reference, SGI offers a very good class (in Mt.View) on writing
  2790. parallel applications, using several different methods.  Definitely
  2791. recommended.
  2792.  
  2793. fap@sgi.com
  2794. frank phillips
  2795. SGI inSane Diego
  2796.  
  2797. --------
  2798.  
  2799. I hope people find this info useful.  I know I will.  Thanks to all who
  2800. responded so quickly.  A big unthank you to myself for waiting so long to
  2801. post.
  2802.  
  2803. Cheers,
  2804. Doug Turner
  2805. turner@apple.com
  2806. 408-974-0484
  2807.  
  2808. -------------------------------------------------------------------------------
  2809. END OF RTNEWS
  2810.